Hello Ayman , The regex is done on the token level and not on the string level.
Lets assume your field value is = abc/xyz This is broken into abc/xyz => [ abc , xyz] Now you can do regex match on the token level and not on abc/xyz. So if you search for ab* , it will match as it matches to abc but abc/x* wont work because there is no single token in that format. Your best bet here would be to make this field not_analyzed as told in the below link. LINK - http://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-core-types.html Now if you apply regex , it should work fine , because there is not tokenizing happening. Thanks Vineeth Mohan, Elasticsearch consultant, qbox.io ( Elasticsearch service provider <http://qbox.io/>) On Mon, Apr 13, 2015 at 5:14 AM, Ayman Shorman <aymanshor...@gmail.com> wrote: > Hello, > > I'm trying to get exact match of field but unfortunately regexp doesn't > work with me. > > I have kibana 4 and elasticsearch 1.4.4 . > > i'm using logstash template in my index and i have all string fields > analyzed and not_analyzed. > > Now i'm trying to search inside field for string exactly for example > > I have this urlField : /lang1/page1/ and /lang2/page1/ and /lang3/page1/ > etc... > > i tried to play with the reg to get the above three urls ONLY but Kibana > keep giving me anything contains any of the above example: > > but Kibana returns to me results contans also: > > /lang1/page4/other/url/?blahblahblah and /hello/this/is/ayman/lang1 > > but i don't need those i just need the above red urls exactly. > > What is the problem here? please advise > > Thanks > > > > -- > 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/f780fa73-1149-4eb7-8cf8-c1132fcb1a52%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/f780fa73-1149-4eb7-8cf8-c1132fcb1a52%40googlegroups.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/CAGdPd5kRT%2BBckR-rJbTbAMgsCqnkTMwk1kBvQU5Z-r5G9EytwA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.