lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Earwin Burrfoot" <>
Subject PhraseQuery with non-strict offsets
Date Wed, 03 Dec 2008 12:03:53 GMT
Not sure if this belongs to java-dev or java-user, correct me if I'm wrong.

I need a variation of PhraseQuery for which position difference
between adjacent terms shouldn't match exactly, but in equals-or-less
"a+1 b+1 c+3"
should match
a b c, a b e c, a b e e c
should not match
a e b c, a b e e e c

Has anyone written/seen something like this, or has an advice on how
to hack stock PhraseQuery to support this?
setSlop fails obviously, because i need strict distance between one
pair of terms, and sloppy between other pair, also i do not need
I could use a big bunch of SpanNear+SpanTerm queries, but is somewhat
reluctant to do this, conversion code will get real ugly, and I'm not
sure about speed.

Kirill Zakharenko/Кирилл Захаренко (
Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
ICQ: 104465785
View raw message