lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allison, Timothy B." <talli...@mitre.org>
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]"

[0] https://github.com/tballison/lucene-addons

-----Original Message-----
From: Uwe Schindler [mailto:uwe@thetaphi.de] 
Sent: Tuesday, December 08, 2015 9:08 AM
To: java-user@lucene.apache.org
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

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Henri Hein [mailto:henri@thinair.com]
> Sent: Tuesday, December 08, 2015 5:56 AM
> To: java-user@lucene.apache.org
> Subject: TermRangeQuery with Proximity
> 
> I saw this archived thread:
> http://mail-archives.apache.org/mod_mbox/lucene-java-
> user/201208.mbox/%3CCAJcVXktUtw9TN3thMhcvT0MBeww+LP_MCZSrgF3a
> TOMzJkuCDg@mail.gmail.com%3E
> 
> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Mime
View raw message