I've got a large person index built for Elasticsearch (1.7.3)
I'm trying to search the person information (few tens of millions). Person's gender (which is 'M' or 'F') is one of many fields in the person document.
When I search using the match query, it takes ages (which I'm guessing it has to collate a large number of postings lists?) cause there might be atleast a million of either gender. Is this a valid observation?
I'm doing a match query because I want the score.
{
"explain": true,
"from": 0,
"size": 10,
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"match": {
"Gender": {
"query": "F",
"boost": 10.0
}
}
}
]
}
}
}
}
}
I understand that filters are very fast and more suited for this (and cached too). Is there any way I could wrap this in a filter and say if it matched then give it a fixed score of 10 (for example)?
Or could I stick on with match query and explore within? Any help/pointers would be much appreciated.