Hello,

I have the following problem: in my application I'm trying to store set of keywords and their weights. Since the number of keywords is variable (and can be as high as 40) I decided to use a single field to store it. In other words, I want to use a single field with multiple values to store a keyword histogram of the document.

Now, I'm wondering how do I encode the weight of keywords... If I do the following:

Field f = Field.Keyword("kw", "value1");
f.setBoost(10.0);
doc.add(f);
f = Field.Keyword("kw", "value2");
f.setBoost(20.0);
doc.add(f);

Now the question is: what is the boost value for the fields when I search? Is it equivalent to "value1^10.0 value2^20.0" (which is my intention), or rather "value1^20.0 value2^20.0"?

If the latter, do you have any suggestions how to achieve the original effect?

Thanks in advance!

--
Best regards,
Andrzej Bialecki

-------------------------------------------------
Software Architect, System Integration Specialist
CEN/ISSS EC Workshop, ECIMF project chair
EU FP6 E-Commerce Expert/Evaluator
-------------------------------------------------
FreeBSD developer (http://www.freebsd.org)




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to