Hi
I'm trying to do a partial match anywhere search over medical terminologies. I've created any index with a multi-filed mapping of ngrams AND standard tokens.
Unfortunately I can't get a good relevance score in the case where a full word and an fragment is typed.
It seems that that full word+segment with AND operator is not a match on the standard index, but without the AND operator false positives come up (but otherwise the result ordering is pretty ok). If I use the AND operator, the standard/english query returns with a 0 and while there are no false positives, matching only one of the terms, the ordering becomes messed up.
This is my latest try:
"query": {
"dis_max": {
"queries": [{
"multi_match": {
"query": expr,
"operator": "AND",
"type": "most_fields",
"fields": [field, field + ".std^4"]
}
},
{
"multi_match": {
"query": expr,
"type": "most_fields",
"fields": [field + ".std^4"]
}
}
]
}
Is there a standard way to solve this issue? (I forgot to mention that I'm new to ES and only read half of the definitive guide so far)