lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: Creating Span Queries from Boolean Queries
Date Tue, 21 Aug 2012 23:26:15 GMT
Give us an example of what you are really trying to match.

SpanNearQuery takes a list of clauses, which can be SpanTermQuery to match a 
single term or SpanNearQuery to match a nested span. You can specify the 
maximum distance between terms/spans - use nesting if you want to change 
that distance. That gives you a basic BooleanQuery with AND clauses 
converted to spans.

-- Jack Krupansky

-----Original Message----- 
From: Dave Seltzer
Sent: Tuesday, August 21, 2012 6:53 PM
Subject: Creating Span Queries from Boolean Queries

Hi Everyone,

If there was a straightforward way to take a Boolean Query created by the
Lucene Query Parser and convert it to a Span Query.

Ideally I'd like to take any ANDed clauses and require them to occur
withing $SPAN of the other ANDs.

I can't quite wrap my head around how to solve the problem.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message