Hi,

I have scores between words, for example - dog and animal have a score of
0.5 (and not 0), dog and cat have a score of 0.2, etc.
These scores are stored in an index:
Doc1: field words: dog animal
         field score: 0.5
 Doc2: field words: dog cat
         field score: 0.2

If the user searches for the word dog - I would like that documents that
contain the word animal or cat will also get a good score (that will take
into account the 0.5 and 0.2).

Basically what I do is: for every document in the database, I loop over the
words that appear in the query (the query is long in a size of an article)
and for every word that appears in each document I take the score from the
index mentioned above and calculating a score between the query and each
document.

Any suggestion how to do it using Lucene search? How to add these values to
the searcher?

I looked at the boosting option, but couldn't really see how it helps me to
that matter.

Thanks,
Liat

Reply via email to