lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teruhiko Kurosaka" <K...@basistech.com>
Subject Phrase query-like query that doesn't requre all the terms?
Date Fri, 14 Nov 2008 16:40:17 GMT
PhraseQuery requires all the terms in the phrase
exists in the field being searched.  I am looking
for a more permissible version of PhraseQuery which
is sensitive to the order of the terms but
allows missing terms, which would lower the score
but still matches.

For example, query "DEF GHI" would match with
"DEF GHI"
"ABC DEF GHI JKL"
"XYZ DEF GHI"
"DEF GHI XYZ"
with relatively high score, but it would also
match with:
"DEF"
"GHI"
"DEF XYZ"
etc. with lower scores.
This would NOT match (or severely penalizes the score) 
with:
"GHI DEF" (out of order)
"ABC XYZ" (no terms)

Is there any such Query class or other way to achieve
the similar effect? 
----
T. "Kuro" Kurosaka, Basis Technology
San Francisco, California, U.S.A.
 

---------------------------------------------------------------------
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