Term filter with 'special' characters

Hello,

I am trying to use a term filter but i don't receive any results and i
think the problem is due to the use of 'special' characters...

My search item has a property called "code" with a value
"test#b7ee8e9f-acd6-489b-b37f-d9c651f1b23b"

In my mapping, i specify the analyzer to be simple in order not to loose
the "special" characters as follows:

.startObject("code")
.field("analyzer", "simple")
.field("type", "string")
.endObject()

I have tried to use the code property in a term filter both i don't get any
results. I've also tried to escape the special characters (as described
http://lucene.apache.org/core/old_versioned_docs/versions/3_4_0/queryparsersyntax.html#Escaping%20Special%20Characters)
but that didn't change anything.

What am i doing wrong please?

Thanks!
Stik

--
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.

Term filters terms are not analyzed, so it should be applied against a
field that is not-analyzed or with KeywordAnalyzer.

--
Ivan

On Wed, May 1, 2013 at 9:46 AM, Stik kos stikkos@gmail.com wrote:

Hello,

I am trying to use a term filter but i don't receive any results and i
think the problem is due to the use of 'special' characters...

My search item has a property called "code" with a value
"test#b7ee8e9f-acd6-489b-b37f-d9c651f1b23b"

In my mapping, i specify the analyzer to be simple in order not to loose
the "special" characters as follows:

.startObject("code")
.field("analyzer", "simple")
.field("type", "string")
.endObject()

I have tried to use the code property in a term filter both i don't get
any results. I've also tried to escape the special characters (as described
Apache Lucene - Query Parser Syntax)
but that didn't change anything.

What am i doing wrong please?

Thanks!
Stik

--
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.