I expect the search results for "red widget" and "red widgets" to be
identical, since the "synonym_analyzer" does stemming, but instead I get
slightly different results (2 more results on the singular term vs. the
plural term).
testing the analyzer with
GET /myindex/_analyzer?text=Widgets returns "widgets"
while
GET /myindex/_analyzer?text=Widgets&analyzer=synonym_analyzer returns
"widget"
so it looks like the default analyzer is not the synonym_analyzer as I
expect it to be. what am I doing wrong? or how can I specify the
analyzer to use in the query so that the search terms are stemmed?
Obviously it has something to do with the text you are indexing and the
shape of the real queries you are using. You have 2 options - either use
Explain to get back an explanation for why this happens and figure out what
happens from there, or isolate this to a unit test and go from there.
I expect the search results for "red widget" and "red widgets" to be
identical, since the "synonym_analyzer" does stemming, but instead I get
slightly different results (2 more results on the singular term vs. the
plural term).
testing the analyzer with
GET /myindex/_analyzer?text=Widgets returns "widgets"
while
GET /myindex/_analyzer?text=Widgets&analyzer=synonym_analyzer returns
"widget"
so it looks like the default analyzer is not the synonym_analyzer as I
expect it to be. what am I doing wrong? or how can I specify the analyzer
to use in the query so that the search terms are stemmed?
apparently duplicating the settings from synonym_analyzer to default works.
I was under the impression that I would not need to duplicate the settings.
Igal
On Sunday, December 22, 2013 1:25:50 AM UTC-8, Itamar Syn-Hershko wrote:
Obviously it has something to do with the text you are indexing and the
shape of the real queries you are using. You have 2 options - either use
Explain to get back an explanation for why this happens and figure out what
happens from there, or isolate this to a unit test and go from there.
I expect the search results for "red widget" and "red widgets" to be
identical, since the "synonym_analyzer" does stemming, but instead I get
slightly different results (2 more results on the singular term vs. the
plural term).
testing the analyzer with
GET /myindex/_analyzer?text=Widgets returns "widgets"
while
GET /myindex/_analyzer?text=Widgets&analyzer=synonym_analyzer returns
"widget"
so it looks like the default analyzer is not the synonym_analyzer as I
expect it to be. what am I doing wrong? or how can I specify the analyzer
to use in the query so that the search terms are stemmed?
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.