How elasticsearch supports regex search and its performance

Hi,

I want to use elasticsearch to index large amount log data and search using
regex.
So I want to know how elasticsearch support the regex search for millions
of raw data.
I think it could not be matching all the records one by one for the
performance, so is there any information for this question?

Thanks for any suggestion.
-Wenbin

--
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.

Hi Wenbin,

Elasticsearch uses lucene's RegexpQuery for this. As of version 0.90 of ES
(using Lucene 4.3) it is executed using an constructed automaton which
makes it much faster. You can read more here:

or

http://lucene.apache.org/core/4_2_0/core/org/apache/lucene/search/RegexpQuery.html

Cheers,
Boaz
On Monday, May 20, 2013 8:22:51 AM UTC+2, Wenbin Li wrote:

Hi,

I want to use elasticsearch to index large amount log data and search
using regex.
So I want to know how elasticsearch support the regex search for millions
of raw data.
I think it could not be matching all the records one by one for the
performance, so is there any information for this question?

Thanks for any suggestion.
-Wenbin

--
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.

Hi Wenbin

Note that the performance of regexes drops off rapidly the shorter the
prefix.

So "foobar.*" will be fast, but ".*foobar" won't...

clint

--
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.