Re: Rewriting other query types into span queries and two questions about this

2011-08-07 Thread Trejkaz
On Mon, Aug 8, 2011 at 10:00 AM, Trejkaz wrote: > >    within(5, 'my', and('cat', 'dog')) -> within(5, 'my', within(10, 'cat', > 'dog') ) To extend my example and maybe make it a bit more hellish, take this one: within(2, A, and(B, or(C, and(D, E After rewriting both and() to SpanNearQ

Re: Rewriting other query types into span queries and two questions about this

2011-08-07 Thread Trejkaz
On Mon, Aug 8, 2011 at 8:58 AM, Michael Sokolov wrote: > Can you do something approximately equivalent like: > > within(5, 'my', and('cat', 'dog')) -> > within(5, 'my', within(5, 'cat', 'dog') ) > > Might not be exactly the same in terms of distances (eg "cat x x x my x x x > dog") might match the

Re: Rewriting other query types into span queries and two questions about this

2011-08-07 Thread Michael Sokolov
On 8/4/2011 9:06 PM, Trejkaz wrote:... For AND (and for any "default boolean" queries which aren't equivalent to OR) queries, I have problems. For instance, you can't do this: within(5, 'my', and('cat', 'dog')) -> and( within(5, 'my', 'cat'), within(5, 'my', 'dog') ) The problem is that

Rewriting other query types into span queries and two questions about this

2011-08-04 Thread Trejkaz
Hi all. I am writing a custom query parser which strongly resembles StandardQueryParser (I use a lot of the same processors and builders, with a slightly customised config handler and a completely new syntax parser written as an ANTLR grammar.) My parser has additional syntax for span queries. T