i just tested it whether our 'beautifu' parser supports it, and funnily
enough, it does :-)
https://github.com/romanchyla/montysolr/commit/f88577345c6d3a2dbefc0161f6bb07a549bc6b15

but i've (kinda) given up hope that people need powerful query parsers in
the lucene world, the LUCENE-5014 is there sitting without attention for
eons ... so your best bet is probably to use LucidWorks parser (but i don't
know if it supports proximity searches combined with wildcards and
booleans) or you can create a custom query plugin that builds the following
query

spanNear([spanOr([SpanMultiTermQueryWrapper(all:consult*),
SpanMultiTermQueryWrapper(all:advis*)]), spanOr([all:fee,
all:retainer, all:salary, all:bonus])], 4, true)

you can draw inspiration from here:
https://github.com/romanchyla/montysolr/blob/master/contrib/antlrqueryparser/src/java/org/apache/lucene/queryparser/flexible/aqp/builders/AqpNearQueryNodeBuilder.java
https://github.com/romanchyla/montysolr/blob/master/contrib/antlrqueryparser/src/java/org/apache/lucene/queryparser/flexible/aqp/builders/SpanConverter.java


but i think you are aware that such a query is NOT going to be very
efficient. especially when proximity=40 ;-)

hth

roman



On Fri, Oct 18, 2013 at 3:28 AM, sayeed <abdulsayeed...@gmail.com> wrote:

> Hi,
> Is it possible to search complex queries like
> (consult* or advis*) NEAR(40) (fee or retainer or salary or bonus)
> in solr
>
>
>
>
> -----
> Sayeed
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Complex-Queries-in-solr-tp4096288.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to