lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Ree <>
Subject Search books specifying proximity of terms within n sentences
Date Fri, 04 Jan 2013 19:07:09 GMT
Hi everyone, new to the mailing list and had search question I hope to get
some help with. I sent this earlier but cc'ed someone and afraid it might
not have been distributed correctly. So I'm sorry if this is a duplicate.

I have an index of books, and I want to allow the user the ability to find
terms that are in nearby sentences.

"TermA NEAR3 TermB" would find all TermA's that are within 3 sentences of

Have found ways to find TermA within same sentence as TermB using
SpanNotQuery and SpanNearQuery and adding sentence boundaries to the index,
but I'm not able to find a way to extend this idea out to allow it to cross
a limited number of sentence boundaries.

Only thing I can think of is to use a dynamic field per a sentence and a
new type of query to be able to search across them, but before I do
anything I was hoping to get some feedback.

Mike Ree

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message