lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allison, Timothy B." <>
Subject RE: TermRangeQuery with Proximity
Date Tue, 08 Dec 2015 14:40:40 GMT
And, if you're looking for a parser, take a look at LUCENE-5205's parser, available as a standalone
on github [0]. 

The syntax for the query mentioned in archived link would be:
"microsoft [belgium TO spain]"


-----Original Message-----
From: Uwe Schindler [] 
Sent: Tuesday, December 08, 2015 9:08 AM
Subject: RE: TermRangeQuery with Proximity

You can create a generalization of PheaseQueries, called SpanNearQueries. Those can have any
other SpanQuery instances as childs, e.g. SpanTermQuery and SpanMultiTermQueryWrapper instances.
As RangeQueries or Wildcards are internally subclasses of MultiTermQuery, you can use them
wrapped in combination with SpanTermQuery and others. But beware: Slow like hell!


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Henri Hein []
> Sent: Tuesday, December 08, 2015 5:56 AM
> To:
> Subject: TermRangeQuery with Proximity
> I saw this archived thread:
> user/201208.mbox/%3CCAJcVXktUtw9TN3thMhcvT0MBeww+LP_MCZSrgF3a
> I am trying to do something similar.  I can do a phrase or proximity 
> search with PhraseQuery/PhraseQuery.Builder.  I can do a range search 
> with TermRangeQuery.  I don't know how to combine them and the above 
> archived thread seems to indicate it's not possible.  Has this 
> changed?
> Thanks,
>   - Henri Hein
> Thin Air Labs

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

View raw message