Hi,
I am trying to make a phrase prefix search on an index that uses the
default analyzer but it seems that it is not working if the word starts
with some letters:
For example :
"query":{"match":{"user":{"query":"an","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"and","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"in","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"or","type":"phrase_prefix"}}}}
return no result
but
"query":{"match":{"user":{"query":"de","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"ds","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"anda","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"inl","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"orb","type":"phrase_prefix"}}}}
return the expected result
I believe this has something to do with the operators "and", "or", "in" .
Is there a way I can make the phrase_prefix work when searching for any
prefix?
Thank you
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
spinscale
(Alexander Reelsen)
June 24, 2013, 1:34pm
2
Hey,
The queries, which do not return any data are actually stopwords. Stopwords
are removed, resulting in an empty query, which is not returning anything.
If you do not want stopwords to be removed, you might want to change your
analyzers.
--Alex
On Tue, Jun 18, 2013 at 11:19 AM, Anda Cipariu andacipariu@gmail.com wrote:
Hi,
I am trying to make a phrase prefix search on an index that uses the
default analyzer but it seems that it is not working if the word starts
with some letters:
For example :
"query":{"match":{"user":{"query":"an","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"and","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"in","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"or","type":"phrase_prefix"}}}}
return no result
but
"query":{"match":{"user":{"query":"de","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"ds","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"anda","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"inl","type":"phrase_prefix"}}}}
"query":{"match":{"user":{"query":"orb","type":"phrase_prefix"}}}}
return the expected result
I believe this has something to do with the operators "and", "or", "in" .
Is there a way I can make the phrase_prefix work when searching for any
prefix?
Thank you
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .