parent
174b4bacbe
commit
a66be6cfb9
|
@ -73,7 +73,7 @@ In this example, words that have a document frequency greater than 0.1%
|
|||
{
|
||||
"common": {
|
||||
"body": {
|
||||
"query": "this is bonsai cool",
|
||||
"query": "this is bonsai cool",
|
||||
"cutoff_frequency": 0.001
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ all terms required:
|
|||
{
|
||||
"common": {
|
||||
"body": {
|
||||
"query": "nelly the elephant as a cartoon",
|
||||
"query": "nelly the elephant as a cartoon",
|
||||
"cutoff_frequency": 0.001,
|
||||
"low_freq_operator": "and"
|
||||
}
|
||||
|
@ -113,8 +113,8 @@ which is roughly equivalent to:
|
|||
{ "term": { "body": "cartoon"}}
|
||||
],
|
||||
"should": [
|
||||
{ "term": { "body": "the"}},
|
||||
{ "term": { "body": "as"}},
|
||||
{ "term": { "body": "the"}}
|
||||
{ "term": { "body": "as"}}
|
||||
{ "term": { "body": "a"}}
|
||||
]
|
||||
}
|
||||
|
@ -131,8 +131,8 @@ must be present, for instance:
|
|||
{
|
||||
"common": {
|
||||
"body": {
|
||||
"query": "nelly the elephant as a cartoon",
|
||||
"cutoff_frequency": 0.001,
|
||||
"query": "nelly the elephant as a cartoon",
|
||||
"cutoff_frequency": 0.001,
|
||||
"minimum_should_match": 2
|
||||
}
|
||||
}
|
||||
|
@ -156,8 +156,8 @@ which is roughly equivalent to:
|
|||
}
|
||||
},
|
||||
"should": [
|
||||
{ "term": { "body": "the"}},
|
||||
{ "term": { "body": "as"}},
|
||||
{ "term": { "body": "the"}}
|
||||
{ "term": { "body": "as"}}
|
||||
{ "term": { "body": "a"}}
|
||||
]
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ minimum_should_match
|
|||
A different
|
||||
<<query-dsl-minimum-should-match,`minimum_should_match`>>
|
||||
can be applied for low and high frequency terms with the additional
|
||||
`low_freq` and `high_freq` parameters Here is an example when providing
|
||||
`low_freq` and `high_freq` parameters. Here is an example when providing
|
||||
additional parameters (note the change in structure):
|
||||
|
||||
[source,js]
|
||||
|
@ -177,8 +177,8 @@ additional parameters (note the change in structure):
|
|||
{
|
||||
"common": {
|
||||
"body": {
|
||||
"query": "nelly the elephant not as a cartoon",
|
||||
"cutoff_frequency": 0.001,
|
||||
"query": "nelly the elephant not as a cartoon",
|
||||
"cutoff_frequency": 0.001,
|
||||
"minimum_should_match": {
|
||||
"low_freq" : 2,
|
||||
"high_freq" : 3
|
||||
|
@ -230,8 +230,8 @@ for high frequency terms is when there are only high frequency terms:
|
|||
{
|
||||
"common": {
|
||||
"body": {
|
||||
"query": "how not to be",
|
||||
"cutoff_frequency": 0.001,
|
||||
"query": "how not to be",
|
||||
"cutoff_frequency": 0.001,
|
||||
"minimum_should_match": {
|
||||
"low_freq" : 2,
|
||||
"high_freq" : 3
|
||||
|
|
Loading…
Reference in New Issue