You are looking at preliminary documentation for a future release.
Not what you want? See the
current release documentation.
Common Terms Usageedit
Fluent DSL Exampleedit
q
.CommonTerms(c => c
.Field(p => p.Description)
.Analyzer("standard")
.Boost(1.1)
.CutoffFrequency(0.001)
.DisableCoord()
.HighFrequencyOperator(Operator.And)
.LowFrequencyOperator(Operator.Or)
.MinimumShouldMatch(1)
.Name("named_query")
.Query("nelly the elephant not as a")
)Object Initializer Syntax Exampleedit
new CommonTermsQuery()
{
Field = Field<Project>(p => p.Description),
Analyzer = "standard",
Boost = 1.1,
CutoffFrequency = 0.001,
DisableCoord = true,
HighFrequencyOperator = Operator.And,
LowFrequencyOperator = Operator.Or,
MinimumShouldMatch = 1,
Name = "named_query",
Query = "nelly the elephant not as a"
}Example json output.
{
"common": {
"description": {
"_name": "named_query",
"boost": 1.1,
"query": "nelly the elephant not as a",
"cutoff_frequency": 0.001,
"low_freq_operator": "or",
"high_freq_operator": "and",
"minimum_should_match": 1,
"analyzer": "standard",
"disable_coord": true
}
}
}