Wildcard Query within a Span

I have never done so, so I could be horribly wrong, but I assume all that
we need to be done is the create a new
org.elasticsearch.index.query.QueryParser that outputs the appropriate
Lucene query and bind it inside IndicesQueriesModule.

On Thu, Nov 8, 2012 at 11:46 AM, Michael Sander michael.sander@gmail.comwrote:

Exposing SpanMultiTermQueryWrapper seems like the way to go. QueryParser
may be more powerful, but I doubt it could be exposed through a generic
interface. Any idea if this is possible with an elasticsearch plugin?

On Wednesday, November 7, 2012 10:46:00 PM UTC-5, Chris Male wrote:

It is definitely possible to rig this sort of complex Query using Lucene.
I would recommend maybe rolling your own QueryParser, maybe based on some
of the existing, that creates the kind of Query you're looking for.

On Thursday, November 8, 2012 6:57:11 AM UTC+11, Michael Sander wrote:

Hi,

Is it possible to construct an elasticsearch query (or filter) that
detects whether two words with wildcards are within a certain distance of
each other. Is this possible with elasticsearch?

For example, I would like a query that detects whether pret* and ug* are
within five words of each other. Such a query should match "She is pretty
and he is ugly."

I think I would need to use the span_near query, but span_near only
accepts a series of span_term's as arguments and span_term doesn't appear
to allow wildcards.

Is it possible to do this with elasticsearch? If not, is this possible
with Lucene directly?

FYI, I have an SO question open here
http://stackoverflow.com/**questions/13258997/**
elasticsearch-query-wildcard-or-stemming-within-a-span-i-e-
proximity-queryhttp://stackoverflow.com/questions/13258997/elasticsearch-query-wildcard-or-stemming-within-a-span-i-e-proximity-query

--

--