Hello,
I have an ES index configured like this :
{
"settings": {
"analysis": {
"filter": {
"name_ngram": {
"type": "ngram",
"min_gram": 3,
"max_gram": 10
}
},
"analyzer": {
"autocomplete_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"name_ngram"
]
}
}
}
},
"mappings": {
"my_type": {
"_all": {
"enabled": false
},
"properties": {
"name": {
"type": "string",
"analyzer": "autocomplete_analyzer",
"search_analyzer": "standard",
"index_options": "docs"
},
"type": {
"type" : "string",
"analyzer": "autocomplete_analyzer",
"search_analyzer": "standard"
}
}
}
}
}
The Type field/property can take one of the following values : {POP, ROCK, ELECTRO, CLASSICAL, JAZZ, OTHERS}
{
"query": {
"multi_match": {
"query": "clap",
"type": "cross_fields",
"operator": "and",
"fields": [
"name",
"type"
]
}
}
}
When I run a query query above I get for instance :
- 40 results of type POP
- 20 results of type JAZZ
- 2800 results of type OTHERS.
I was wondering if there is a way to limit the number of results for the type OTHERS to 200.