incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <>
Subject ProximityQuery
Date Tue, 16 Mar 2010 03:57:28 GMT
I'd like to offer a proximity query type in my app, so that I can search like:

 foo NEAR10 bar

to find all instances of 'foo' within 10 token positions of 'bar'.[0]

It seems like the place to start, if I were to take the route of
subclassing/extending an existing class, is the PhraseQuery feature,
specifically the PhraseScorer and the internal winnow_anchors() function. Am I
on the right track here?

[0] I believe Lucene syntax for that query is "foo bar"~10

Peter Karman  .  .

View raw message