regex - Kibana Regular expression search -
i newbie elk. want search docs based on order of occurrence of words in field. example,
in doc1, my_field: "my foo word bar example"
in doc2, my_field: "my bar word foo example"
i query in kibana docs "foo" followed "bar" , not opposite. so, doc1 return in case , not doc2. tried using below query in kibana search. but, not working. query doesn't produce search results.
my_field.raw:/.*foo.*bar.*/
i tried analyzed field(just my_field
), though came know should not work. , of course, didn't produce results either.
please me regex search. why not getting matching result query?
i'm not sure offhand why regex query wouldn't working believe kibana using elasticsearch's query string query documented here instance phrase query (documented in link) putting search in double quotes , word "foo" followed "bar". perform better since on analyzed field (my_field) has tokenized each word perform fast lookups. search in kibana be:
my_field: "foo bar"
update:
looks annoying quirk of kibana (probably backwards compatability reasons). anyway, isn't matching because you're searching against non-analyzed field , apparently kibana default lowercasing search therefore won't match the non-analyzed uppercase "foo". can configure in kibana advanced settings mentioned here, setting configuration option "lowercase_expanded_terms" false.
Comments
Post a Comment