Percolaror with exact match

I'm going to use percolate option to index my queries. Some of them
contains special characters (like "-", "+"). For given document i.e.:

doc {
source: "www.a-b.com"
}

I need return only these queries that exactly match to this text. I used
termQuery from JavaAPI but it doesn't work. How can I provide "exact
match"?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/00a58083-c06d-442e-8550-5ef5c81fe448%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You can handle the "matching" part by defining the correct analyzer for the
source field. So for example, if you set define source as "not_analyzed",
it should perform a case-sensitive exact match without going through text
analysis.

On Tuesday, January 21, 2014 10:55:12 AM UTC-5, Tomasz Romanczuk wrote:

I'm going to use percolate option to index my queries. Some of them
contains special characters (like "-", "+"). For given document i.e.:

doc {
source: "www.a-b.com"
}

I need return only these queries that exactly match to this text. I used
termQuery from JavaAPI but it doesn't work. How can I provide "exact
match"?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8d896c97-702a-4ccb-880d-5a1bd186a5be%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Where should I define source as not_analyzed? During index creation (in
mapping)? or in queries?

W dniu wtorek, 21 stycznia 2014 17:50:02 UTC+1 użytkownik Binh Ly napisał:

You can handle the "matching" part by defining the correct analyzer for
the source field. So for example, if you set define source as
"not_analyzed", it should perform a case-sensitive exact match without
going through text analysis.

On Tuesday, January 21, 2014 10:55:12 AM UTC-5, Tomasz Romanczuk wrote:

I'm going to use percolate option to index my queries. Some of them
contains special characters (like "-", "+"). For given document i.e.:

doc {
source: "www.a-b.com"
}

I need return only these queries that exactly match to this text. I used
termQuery from JavaAPI but it doesn't work. How can I provide "exact
match"?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/add8adb3-516e-494f-b129-8f05146e34ef%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.