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 had only one compiler class and never feel good about it:) -- Best regards, Charlie --- Monday, July 24, 2006, 2:04:35 AM, you wrote: : >> 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 ... in my mind the > "natural language expression" for this query... > spanNear([spanOr([spanNear([field:six, field:hundred], 0, true), > spanNear([field:seven, field:hundred], 0, true) > ]), > spanOr([field:seven, field:six])], > 100, true) > ...is... > Either "six" followed by "hundred" with no gap between them, or "seven" > followed by "hundred" with no gap between them; followed by either > "seven" or "six" with a gap of no more no more then 100 tokens in > between them. > It's a fairly contrived test case from TestSpansAdvanced if i'm not > mistaken, constructed purely to test some complex combinations. > An example that might make a little more sense is something like... > spanNear([spanOr([spanNear([field:Erik, field:Hatcher], 0, true), > spanNear([field:Otis, field:Gospodnetic], 0, true) > ]), > spanOr([field:Apache, field:Lucene])], > 100, false) > ...which I would translate as... > Either "Erik" followed by "Hatcher" with no gap between them, or "Otis" > followed by "Gospodnetic" with no gap between them; near either > "Apache" or "Lucene" with a gap of no more no more then 100 tokens in > between them. > -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]