I add to Ivan's answer that for you use case as you query your term with lower case, you should use a keyword tokenizer + a lowercase filter in a custom analyzer and apply it to your field as described by Ivan.
--
David 
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 5 août 2013 à 07:26, Ivan Brusic ivan@brusic.com a écrit :
Term queries terms are not analyzed, so they work best against fields that are not analyzed. If you did not specify the CAT_NAME field as not_analyzed (or used a keyword analyzer), then the standard analyzer will be used and the value will be split in multiple tokens. Change the mapping for that field to be not_analyzed and re-index your content.
http://www.elasticsearch.org/guide/reference/mapping/core-types/
--
Ivan
On Sun, Aug 4, 2013 at 9:16 PM, cyrilforce cheehoo84@gmail.com wrote:
Hi,
Would like to know whether term query support two separate letters as i can't find it in the document of any indication (if not any alternative as i need exact word matching). I have the following query :
{
"query": {
"filtered" : {
"query" : {
"term" : {
"USER_ID" : "2"
}
},
"filter" : {
"bool" : {
"must" : [
{ "term" : { "CAT_ID" : "131"}}, //ContentType
{ "term" : { "CAT_NAME" : "latest games"}} //Genre
]
}
}
}
}
}
and it doesn't return result however if the cat_name was latest then it return.
The document have the following :
"CAT_NAME": [
"Ala Carte",
"OffSeason",
"Latest Games",
"Adventure"
],
--
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.
--
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.