Any explanation why match_phrase_prefix search for "good m" failes while "good mo" search is successfull?
The doc in my index is:
{
"_index": "search_ltv_2017-04-02t08:40:01.000z",
"_type": "eng",
"_id": "uri:prg:pass-program-57464243~uri:scd:TV04:pass-program-57464243:05042017060000_eng",
"_source": {
"startTime": 1491372000000,
"duration": 3600000,
"endTime": 1491375600000,
"channelId": "TV04",
"title": "Good morning"
}
The document is returned by:
{
"query":
{ "bool":
{ "should":
[ { "match_phrase_prefix": { "title": "Good mo" } }]
}
}
}
But is not returned by:
{
"query":
{ "bool":
{ "should":
[ { "match_phrase_prefix": { "title": "Good m" } }]
}
}
}
BTW, same works fine for other documents such as "Good evening" which is returned by "good e" match_phrase_prefix query. What can explain the failure for this specific document?
The search for 'good m' will expand to the first 50 (by default) 'm' words alphabetically found in the index - even if they have nothing to do with 'good' eg mad, made, map, mat etc That finds nothing.
Your search for 'good mo' might expand to something like moon, moose, morning and therefore match.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.