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