Hi Team ,
I am facing the issue while doing autocomplete in elasticsearch.
my Query:
GET /gensuite/itemfacetdata/_search
{
"size" : 100,
"query" : {
"match_phrase_prefix": {
"3": "doo"
}
},
"highlight" : {
"fields" : {
"3" : {
"fragment_size" : 0,
"number_of_fragments" : 0
}
}
}
result:
{
"took": 15,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 99704,
"max_score": 21.841854,
"hits": [
{
"_index": "gensuite",
"_type": "itemfacetdata",
"_id": "1175344_1_1",
"_score": 21.841854,
"_source": {
"3": [
"PANEL, BOUNDER FRONT DOORSIDELUGGAGE DOO"
],
"7": [
"EA"
],
"8": [
"1.00"
],
"9": [
"USAS"
],
"10": [
"1"
],
"11": [
"627498"
],
"13": [
"false"
],
"14": [
"627498"
],
"37": "1",
"partId": 1175344,
"languageId": 1,
"mediaId": 0,
"partTypeId": 1,
"partNumber": "627498"
},
"highlight": {
"3": [
"PANEL, BOUNDER FRONT DOORSIDELUGGAGE DOO"
]
}
}
}
My expectation is the term which starts with 'doo' should br resulted first .
I have loaded the data to the ES By bulkupdate and do not have any analyzer.
Thanks in Advance .
Regards:
Venkatesh.