I am working with elastic search and using RabbitMQ River. I want to
use custom analyzer. When I read about it I found few ways to
configure it but when I executed with the mapping it did not gave me
any parsing exception but also not got the predicted output while
searching.
Tested Output:
I included "inc" in the stop words file but when I searched "inc" it
should give me 0 hits as the stop word filter, filters the stop words
from the index but I am getting 1 hit as the text I have indexed
contain "inc".
This made me sure that the custom analyzer is not configured
correctly.
Before you create the river, you need to precreate the index it will index
into, and have the relevant mappings set on it (and settings, like analysis
settings).
I am working with Elasticsearch and using RabbitMQ River. I want to
use custom analyzer. When I read about it I found few ways to
configure it but when I executed with the mapping it did not gave me
any parsing exception but also not got the predicted output while
searching.
Tested Output:
I included "inc" in the stop words file but when I searched "inc" it
should give me 0 hits as the stop word filter, filters the stop words
from the index but I am getting 1 hit as the text I have indexed
contain "inc".
This made me sure that the custom analyzer is not configured
correctly.
As you said I created index with the defined mapping in it and river it.
The implemented class can be viewed at RabbitMQ River With Custom Analyzer · GitHub
.I have mentioned code snippet on gist SearchTest.java
#https://gist.github.com/1638251#file_search_test.java where
I am trying to search data "inc" with using logical name search_analyzer
but again the result is not expected as I included "inc" in Stop Word List
, again I am not sure the mapping I have set is being utilized or not.
I am stuck with the following points:
Can you please tell me the way, to verify the mapping details that are
currently being used on index using java.
If I am following wrong way while searching the data how can I correct
it to make it work using java API.
Thanks
On Thu, Jan 19, 2012 at 2:34 AM, Shay Banon kimchy@gmail.com wrote:
Before you create the river, you need to precreate the index it will index
into, and have the relevant mappings set on it (and settings, like analysis
settings).
I am working with Elasticsearch and using RabbitMQ River. I want to
use custom analyzer. When I read about it I found few ways to
configure it but when I executed with the mapping it did not gave me
any parsing exception but also not got the predicted output while
searching.
Tested Output:
I included "inc" in the stop words file but when I searched "inc" it
should give me 0 hits as the stop word filter, filters the stop words
from the index but I am getting 1 hit as the text I have indexed
contain "inc".
This made me sure that the custom analyzer is not configured
correctly.
You are putting the analyzer config as a mapping. The analyzer config is
placed in the settings of an index (or in the config file), and mapping
define the how the json document ends up being indexed, for example, have a
specific field associated with a custom analyzer defined in your settings.
As you said I created index with the defined mapping in it and river it.
The implemented class can be viewed at RabbitMQ River With Custom Analyzer · GitHub
.I have mentioned code snippet on gist SearchTest.java #https://gist.github.com/1638251#file_search_test.java where
I am trying to search data "inc" with using logical name search_analyzer
but again the result is not expected as I included "inc" in Stop Word List
, again I am not sure the mapping I have set is being utilized or not.
I am stuck with the following points:
Can you please tell me the way, to verify the mapping details that
are currently being used on index using java.
If I am following wrong way while searching the data how can I
correct it to make it work using java API.
Thanks
On Thu, Jan 19, 2012 at 2:34 AM, Shay Banon kimchy@gmail.com wrote:
Before you create the river, you need to precreate the index it will
index into, and have the relevant mappings set on it (and settings, like
analysis settings).
I am working with Elasticsearch and using RabbitMQ River. I want to
use custom analyzer. When I read about it I found few ways to
configure it but when I executed with the mapping it did not gave me
any parsing exception but also not got the predicted output while
searching.
Tested Output:
I included "inc" in the stop words file but when I searched "inc" it
should give me 0 hits as the stop word filter, filters the stop words
from the index but I am getting 1 hit as the text I have indexed
contain "inc".
This made me sure that the custom analyzer is not configured
correctly.
You are putting the analyzer config as a mapping. The analyzer config is
placed in the settings of an index (or in the config file), and mapping
define the how the json document ends up being indexed, for example, have a
specific field associated with a custom analyzer defined in your settings.
As you said I created index with the defined mapping in it and river it.
The implemented class can be viewed athttps://gist.github.com/1638251
.I have mentioned code snippet on gist SearchTest.java #https://gist.github.com/1638251#file_search_test.java where
I am trying to search data "inc" with using logical name search_analyzer
but again the result is not expected as I included "inc" in Stop Word List
, again I am not sure the mapping I have set is being utilized or not.
I am stuck with the following points:
Can you please tell me the way, to verify the mapping details that
are currently being used on index using java.
If I am following wrong way while searching the data how can I
correct it to make it work using java API.
Thanks
On Thu, Jan 19, 2012 at 2:34 AM, Shay Banon kim...@gmail.com wrote:
Before you create the river, you need to precreate the index it will
index into, and have the relevant mappings set on it (and settings, like
analysis settings).
I am working with Elasticsearch and using RabbitMQ River. I want to
use custom analyzer. When I read about it I found few ways to
configure it but when I executed with the mapping it did not gave me
any parsing exception but also not got the predicted output while
searching.
Tested Output:
I included "inc" in the stop words file but when I searched "inc" it
should give me 0 hits as the stop word filter, filters the stop words
from the index but I am getting 1 hit as the text I have indexed
contain "inc".
This made me sure that the custom analyzer is not configured
correctly.
I refer https://groups.google.com/group/elasticsearch/browse_thread/thread/bd...
but got no success when executed this mapping.
I used this mappinghttps://gist.github.com/1626452but I am not sure
that this is completely correct.Please tell me where I am going wrong
and what changes are needed to be made.
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.