How can we we check which the analyzer is used in analyzing each
field during indexing?
by checking the QueryStringQueryBuilder, the default analyzer used
is "smart search analyzer" and so I have this problem:
the query string contains some words that are not be stripped away by
"smart search analyzer" but the words are stripped away by the
"default" analyzer used to index and analyze the fields, that leads to
searching for some words will yield no result
and I tried to set the QueryStringQueryBuilder to "standard" (I just
guessed the default analyzer is standard, that's why I asked the
question 1 above) and I can search the result
so, is there any problem to change from "smart" to "standard" analyzer?
or is there any documentation that can help to understand the logic of
different analyzers?
by checking the QueryStringQueryBuilder, the default analyzer used
is "smart search analyzer" and so I have this problem:
the query string contains some words that are not be stripped away by
"smart search analyzer" but the words are stripped away by the
"default" analyzer used to index and analyze the fields, that leads to
searching for some words will yield no result
just use your smart analyzer at index and search time or the other way
around?
and I tried to set the QueryStringQueryBuilder to "standard" (I just
guessed the default analyzer is standard, that's why I asked the
question 1 above) and I can search the result
so, is there any problem to change from "smart" to "standard" analyzer?
if you change the the query side analyzer to be the same as the index time
analyzer you don't have any problems i'd say. if you have different
analyzers at search and index time you just need to make sure they are
compatible. ie. you can use synonyms at query time OR at index time and
keep the rest of the analyzer the same. does that make sense?
or is there any documentation that can help to understand the logic of
different analyzers?
you can check the lucene documenation for analyzers ie. java books or read
lucene in action (good reading anyway) there is no tutorial like
documentation for it around. (at least that I know of)
by checking the QueryStringQueryBuilder, the default analyzer used
is "smart search analyzer" and so I have this problem:
the query string contains some words that are not be stripped away by
"smart search analyzer" but the words are stripped away by the
"default" analyzer used to index and analyze the fields, that leads to
searching for some words will yield no result
just use your smart analyzer at index and search time or the other way
around?
and I tried to set the QueryStringQueryBuilder to "standard" (I just
guessed the default analyzer is standard, that's why I asked the
question 1 above) and I can search the result
so, is there any problem to change from "smart" to "standard" analyzer?
if you change the the query side analyzer to be the same as the index time
analyzer you don't have any problems i'd say. if you have different
analyzers at search and index time you just need to make sure they are
compatible. ie. you can use synonyms at query time OR at index time and keep
the rest of the analyzer the same. does that make sense?
or is there any documentation that can help to understand the logic of
different analyzers?
you can check the lucene documenation for analyzers ie. java books or read
lucene in action (good reading anyway) there is no tutorial like
documentation for it around. (at least that I know of)
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.