Re: Span Query NLE

2006-07-30 Thread Paul Elschot
On Tuesday 25 July 2006 03:26, Charlie wrote: ... > > can "surround" be nested > > 3w(4n(a?a AND bb?) AND cc+) Yes, but iirc the "arguments" need to be separated by comma's: 3w( 4n( ... , ...) , ...) instead of by AND. Regards, Paul Elschot -

Re[4]: Span Query NLE

2006-07-24 Thread Charlie
Thanks Erik, "surround" query parser is surely interesting to me. I really wish surround.txt could explain more in detail and add more examples, especially in its test cases, it will be very instrumental to add similar test cases like what org.apache.lucene.queryParser.TestQueryParser offered and

Re: Re[2]: Span Query NLE

2006-07-24 Thread karl wettin
On Mon, 2006-07-24 at 13:44 -0400, Erik Hatcher wrote: > It does take some time for someone unfamiliar with JavaCC, such as > myself initially, to implement a custom parser but it can be a huge > success for a project to have this capability. 5 cents: In case of anyone consider writing a new que

Re: Re[2]: Span Query NLE

2006-07-24 Thread Erik Hatcher
The "surround" query parser in Lucene's contrib area implements a language to construct SpanQuery's. Check out surround.txt in Subversion: I have written a query parser for a client that allows construction of v

Re[2]: Span Query NLE

2006-07-24 Thread Charlie
Thanks for both of you, Karl and Chris. You both made my intention even more clearer. So now the question is: Is there a powerful QueryParser.jj can process span query syntax? (prerequisite is: have we ever defined the Span Query Syntax?) I will be boasting if I am claim to write one now. I

Re: Span Query NLE

2006-07-24 Thread karl wettin
On Mon, 2006-07-24 at 00:04 -0700, Chris Hostetter wrote: > > not supported by the QueryParser. > I think one of us is missunderstanding the question ... in my mind the > "natural language expression" for this query... > >spanNear([spanOr([spanNear([field:six, > ...is... > > Either "six

Re: Span Query NLE

2006-07-24 Thread Chris Hostetter
: > Would anyone give me a hint regarding the natural language expression : > of the following span query? : I'm sorry, but all queries are not supported by the QueryParser. Spans : beeing one of them. See QueryParser.jj to add your syntax. I think one of us is missunderstanding the question ...

Re: Span Query NLE

2006-07-23 Thread karl wettin
On Sun, 2006-07-23 at 21:31 -0500, Charlie wrote: > Would anyone give me a hint regarding the natural language expression > of the following span query? > spanNear([spanOr([spanNear([field:six, field:hundred], 0, true), > spanNear([field:seven, field:hundred], 0, true)]), > spanOr([field:seven, fi

Span Query NLE

2006-07-23 Thread Charlie
Would anyone give me a hint regarding the natural language expression of the following span query? if creating queries programmatically (it is in Lucene scr) SpanTermQuery t1 = new SpanTermQuery(new Term("field","six")); SpanTermQuery t2 = new SpanTermQuery(new Term("field","h