lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Giving weight to partial matches
Date Wed, 21 Jun 2006 18:22:29 GMT
: content field, and return results only if either title or content
: matches ALL the words searched. So searching for "miracle cure for
: cancer" might yield:
:
: (+title:miracle +title:cure +title:for +title:cancer)^5.0
: (+content:miracle +content:cure +content:for +content:cancer)

first off, a really sloppy phrase query may serve you better hear .. it
will have the added beenfit of soring docs where these words appear closer
together higher...

   (title:"miracle cure for cancer" content:"miracle cure for cancer")

: What I like to do now is to give additional weight to a result if the
: title field contains some of the words being search, for example the
: document:

just treat your current query as a required clause of a new boolean query,
and add each of the individual words as optional clauses...

   (+(title:"miracle cure for cancer" content:"miracle cure for cancer")
    title:miracle title:cure title:for title:cancer)



-Hoss


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