lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ayyanar <>
Subject Newbie Question on - Multi valued Keyword field search
Date Sat, 13 Dec 2008 05:20:18 GMT

Let's say that I have 3 documents with a field "name" and a multivalued field

Document 1:

Name = Dog
Keywords = Cool, Big, Dirty

Document 2:

Name = Cat
Keywords = Small, Dirty

Document 3:

Name = Fish
Keywords = Smells, Dirty

If I search the keyword "Dirty", then I need to get all the documents with
the keyword "Dirty". But I want document 3 to come first. Iam aware we can
set the boost for the keyword "Dirty", and we can go for the following

1) Storing multiple times the boosted keyword
2) Using payload

Iam not sure on how to write the code for the payload concept since there is
no good example code available in the net. You can help me on two things:

1) Suggesting some other good approach
2) Providing me the payload code example.

Thanks in advance
View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message