Why es has not something like RegexQueryBuilder?


(Weiwei Wang) #1

I need to do some regex search but can not find a QueryBuilder like
RegexQueryBuilder.

how should i do regex search under ES?


(Clinton Gormley) #2

On Tue, 2011-05-31 at 22:04 -0700, Weiwei Wang wrote:

I need to do some regex search but can not find a QueryBuilder like
RegexQueryBuilder.

how should i do regex search under ES?

Currently the RegexQueryBuilder isn't in ES. You can open an issue to
have it included if you like. Not sure why Shay hasn't included it - he
may have a reason

c


(Weiwei Wang) #3

It's better to provide a LuceneQueryWrapperBuilder to wrap a lucene
query, in this way we can employ all the query functions provided by
Lucene/

On Jun 1, 5:21 pm, Clinton Gormley clin...@iannounce.co.uk wrote:

On Tue, 2011-05-31 at 22:04 -0700, Weiwei Wang wrote:

I need to do some regex search but can not find a QueryBuilder like
RegexQueryBuilder.

how should i do regex search under ES?

Currently the RegexQueryBuilder isn't in ES. You can open an issue to
have it included if you like. Not sure why Shay hasn't included it - he
may have a reason

c


(Shay Banon) #4

Regex is not exposed because of its performance problems in Lucene 3.1. A wrapper around any Lucene query is not possible since you need to know how to "parse" the query representation, so it requires writing a plugin that adds a new type of query.

On Wednesday, June 1, 2011 at 3:41 PM, Weiwei Wang wrote:

It's better to provide a LuceneQueryWrapperBuilder to wrap a lucene
query, in this way we can employ all the query functions provided by
Lucene/

On Jun 1, 5:21 pm, Clinton Gormley <clin...@iannounce.co.uk (http://iannounce.co.uk)> wrote:

On Tue, 2011-05-31 at 22:04 -0700, Weiwei Wang wrote:

I need to do some regex search but can not find a QueryBuilder like
RegexQueryBuilder.

how should i do regex search under ES?

Currently the RegexQueryBuilder isn't in ES. You can open an issue to
have it included if you like. Not sure why Shay hasn't included it - he
may have a reason

c


(Weiwei Wang) #5

gotcha, thanks shay~

On Jun 1, 8:43 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Regex is not exposed because of its performance problems in Lucene 3.1. A wrapper around any Lucene query is not possible since you need to know how to "parse" the query representation, so it requires writing a plugin that adds a new type of query.

On Wednesday, June 1, 2011 at 3:41 PM, Weiwei Wang wrote:

It's better to provide a LuceneQueryWrapperBuilder to wrap a lucene
query, in this way we can employ all the query functions provided by
Lucene/

On Jun 1, 5:21 pm, Clinton Gormley <clin...@iannounce.co.uk (http://iannounce.co.uk)> wrote:

On Tue, 2011-05-31 at 22:04 -0700, Weiwei Wang wrote:

I need to do some regex search but can not find a QueryBuilder like
RegexQueryBuilder.

how should i do regex search under ES?

Currently the RegexQueryBuilder isn't in ES. You can open an issue to
have it included if you like. Not sure why Shay hasn't included it - he
may have a reason

c


(system) #6