prefix query is not returning the correct results..
in ISO Country data.. my query was
{"query":{"bool":{"must":[{"prefix":{"country.name":"in"}}],"must_not":[],"should":[]}},"from":0,"size":50,"sort":[],"facets":{}}
and the returned result is:
{ took: 3 timed_out: false _shards: { total: 5 successful: 5 failed: 0 }
hits: { total: 3 max_score: 1 hits: [ { _index: restdb _type: country _id:
sX3-aNGBQaOjo-L7zNj7qQ _score: 1_source: { id: 519fcbce820ea8950373612b code
: ID name: INDONESIA } }{ _index: restdb _type: country _id:
YMXpIxaPRzmkMZqaKQ36pw _score: 1_source: { id: 519fcbce820ea895037360e4 code
: IO name: BRITISH INDIAN OCEAN TERRITORY }}{ _index: restdb _type:
country _id: Ok9MHCr4RLqjH6oFLX92EA _score: 1_source: { id:
519fcbce820ea8950373612a code: IN name: INDIA }}
] } }
As, you can see, red coloured data, is not matching prefix query..
Am i correct i need to do something else.., if not please help me to find
out correct way to do so, else, give me go ahead, to post this as bug.
and the returned result is:
{ took: 3 timed_out: false _shards: { total: 5 successful: 5 failed: 0 } hits: { total: 3 max_score: 1 hits: [ { _index: restdb _type: country _id: sX3-aNGBQaOjo-L7zNj7qQ _score: 1_source: { id: 519fcbce820ea8950373612b code: ID name: INDONESIA } }{ _index: restdb _type: country _id: YMXpIxaPRzmkMZqaKQ36pw _score: 1_source: { id: 519fcbce820ea895037360e4 code: IO name: BRITISH INDIAN OCEAN TERRITORY }}{ _index: restdb _type: country _id: Ok9MHCr4RLqjH6oFLX92EA _score: 1_source: { id: 519fcbce820ea8950373612a code: IN name: INDIA }}
] } }
As, you can see, red coloured data, is not matching prefix query..
Am i correct i need to do something else.., if not please help me to find out correct way to do so, else, give me go ahead, to post this as bug.
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.