Page 1 of 1

ElasticSearch regex search

Posted: Tue Dec 06, 2016 9:42 am
by bennyboy
Hi,

I try to understand how I can do search with a regex. I read that : https://www.elastic.co/guide/en/elastic ... query.html

I try to use a query like the screenshoot and like the example under.

{
"regexp": {
"message": {
"value": "AW.......E"
}
}
}

I don't find the way to do it.

Help!

Re: ElasticSearch regex search

Posted: Tue Dec 06, 2016 12:27 pm
by mcapra
It looks like you are defining regular expressions within filters, which is a much different process than defining regular expressions within queries.

If you're just looking to search a field using a regular expression, change the search type from lucene to regex and plug the regex into the search bar:
2016_12_06_11_26_01_Dashboard_Nagios_Log_Server.png
If that doesn't work, could you share some sample messages as well as the regex you are trying to match?