Search results vary with max_expansion across jvm

I have created an index using an input data file in one machine. I again created a new index with the same input data file in different machine. I execute following query in both machines:

{
"fields":["AD10"],
"from": 0,
"size": 5000,
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"bool": {
"must": {
"match": {
"AD10": {
"query": "roma",
"type": "phrase_prefix",
"max_expansions" : 124,
"boost": 1
}
}
}
}
}
}
}
}

The issue is that I get different hit count, 2017 in one machine and 2085 in the other. Then I dig more and used explain = true and found that the new terms array of 124 (max_expansions) terms created for prefix match in both machines is different. It seems that ES is picking random list of terms for prefix matching rather then incrementally adding terms to the list in ascending order which seems to be a bug. Please help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.