Thank you Vineeth, I changed the mapping to :
PUT test/_mapping/t { "t" : { "properties" : { "message" : {"type" : "string", index: "not_analyzed", "store" : true } } } } And the result is the same. Wang From: elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com] On Behalf Of vineeth mohan Sent: Monday, November 10, 2014 4:54 PM To: elasticsearch@googlegroups.com Subject: Re: term filter failed on very long fields Hello Wang , Can you disable analyzer and try again . Thanks Vineeth On Mon, Nov 10, 2014 at 2:07 PM, Wang Yong <cnwangy...@gmail.com <mailto:cnwangy...@gmail.com> > wrote: Hi folks, I was trying to do a term filter on a very long string field, maybe more then 500 bytes, but I got 0 hit. So, I am wondering if there is a limitation on the length of field while using term filter. The elasticsearch is 1.3.0 with the map like this : curl -XPUT 'http://localhost:9200/test/_mapping/t' -d ' { "t" : { "properties" : { "message" : {"type" : "string", "store" : true } } } } ' For the test, I put a doc into this map first by : POST /test/t/ { "message": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" } And then, I tried to search by : GET test/_search { "from" : 0, "size" : 20, "query" : { "filtered" : { "query" : { "match_all" : { } }, "filter" : { "and" : { "filters" : [{ "term" : { "message" : "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" } } ] } } } } } I got the result: { "took": 0, "timed_out": false, "_shards": { "total": 1, "successful": 1, "failed": 0 }, "hits": { "total": 0, "max_score": null, "hits": [] } } Any comment will be appreciated, thanks a lot! -- 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+unsubscr...@googlegroups.com <mailto:elasticsearch+unsubscr...@googlegroups.com> . To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/002b01cffcc1%2484429f00%248cc7dd00%24%40gmail.com <https://groups.google.com/d/msgid/elasticsearch/002b01cffcc1%2484429f00%248cc7dd00%24%40gmail.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com <mailto:elasticsearch+unsubscr...@googlegroups.com> . To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nC0O%3DD91YMO0mV0YD7k5QKY%2BAZddyVysUapNpGABMMYw%40mail.gmail.com <https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nC0O%3DD91YMO0mV0YD7k5QKY%2BAZddyVysUapNpGABMMYw%40mail.gmail.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/004401cffcc9%2462ce7f80%24286b7e80%24%40gmail.com. For more options, visit https://groups.google.com/d/optout.