Question about analyzers and special characters


(Daniel Duarte Figueiredo) #1

Hello,
I am indexing documents called "Posts" and "Tags". I have tags such as C++,
C, C# and so on. When I want to see if a tag name already exists, I use a
text query in the field name, but then it ignores the special characters
and I get more than one tag, and I wanted just the one with exact name.
I found this answer to the problem:
https://groups.google.com/forum/#!searchin/elasticsearch/special$20characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ

But I don't know very much about analyzers. Do I need to index the
documents with the "not_analyzed" field, or can I keep indexing them with
the default analyzer and use the "not_analyzed" property only when I want
to retrieve the tags by name?

--


(Daniel Duarte Figueiredo) #2

Update: I tried setting the "not_analyzed" field in the text query and now
I am not getting any results..

Em quarta-feira, 22 de agosto de 2012 22h09min04s UTC-3, Daniel Duarte
Figueiredo escreveu:

Hello,
I am indexing documents called "Posts" and "Tags". I have tags such as
C++, C, C# and so on. When I want to see if a tag name already exists, I
use a text query in the field name, but then it ignores the special
characters and I get more than one tag, and I wanted just the one with
exact name.
I found this answer to the problem:

https://groups.google.com/forum/#!searchin/elasticsearch/special$20characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ

But I don't know very much about analyzers. Do I need to index the
documents with the "not_analyzed" field, or can I keep indexing them with
the default analyzer and use the "not_analyzed" property only when I want
to retrieve the tags by name?

--


(David Pilato) #3

A full curl recreation could help to understand your issue.
See http://www.elasticsearch.org/help/

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 août 2012 à 03:14, Daniel Duarte Figueiredo danielduartefigueiredo@gmail.com a écrit :

Update: I tried setting the "not_analyzed" field in the text query and now I am not getting any results..

Em quarta-feira, 22 de agosto de 2012 22h09min04s UTC-3, Daniel Duarte Figueiredo escreveu:
Hello,
I am indexing documents called "Posts" and "Tags". I have tags such as C++, C, C# and so on. When I want to see if a tag name already exists, I use a text query in the field name, but then it ignores the special characters and I get more than one tag, and I wanted just the one with exact name.
I found this answer to the problem:
https://groups.google.com/forum/#!searchin/elasticsearch/special$20characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ
But I don't know very much about analyzers. Do I need to index the documents with the "not_analyzed" field, or can I keep indexing them with the default analyzer and use the "not_analyzed" property only when I want to retrieve the tags by name?

--


(lamrwhite) #4

Through http://www.elasticsearch.org/help/.....you would find the best help and can have your issues resolved soon!!


(system) #5