Class ExternalApiElasticSearchParams
The search parameters to use for the ELASTIC_SEARCH spec. This data type is not supported in Gemini API.
public record ExternalApiElasticSearchParams : IEquatable<ExternalApiElasticSearchParams>
- Inheritance
-
ExternalApiElasticSearchParams
- Implements
- Inherited Members
Properties
Index
The ElasticSearch index to use.
[JsonPropertyName("index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Index { get; set; }
Property Value
NumHits
Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch
as the num_hits param.
[JsonPropertyName("numHits")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? NumHits { get; set; }
Property Value
- int?
SearchTemplate
The ElasticSearch search template to use.
[JsonPropertyName("searchTemplate")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? SearchTemplate { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ExternalApiElasticSearchParams object.
public static ExternalApiElasticSearchParams? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ExternalApiElasticSearchParams
The deserialized ExternalApiElasticSearchParams object, or null if deserialization fails.