Hi Vlad,
I believe you can achieve this using the function package (i.e.
Function Queries, org.apache.lucene.search.function). The other
thing that comes to mind is, if you don't truly need the bit mask for
other things, is to encode it into the Field as a boost value. This
may be complicated by the lack of granularity in boost encoding, but
it might work for you.
-Grant
On Nov 25, 2008, at 11:47 PM, Vlad Olenin wrote:
Hi,
I'm new to Lucene, so looking for some guidance as to the most
efficient /
appropriate way to implement the following functionality.
* Each Document consists of a number of fields
* Each Field value, when indexed, can have different 'score' value
associated with it
** for simplicity, the score is presented as a bit mask
** each field value might have different score for the same field
** each field value might have different score for the different
fields
*** eg, if doc1.field1.value = "val1, val2, val3", then index over
field1
might have different score values associated with each value (here are
{docId.field, score} pairs):
*** val1 = {doc1.field1, '0011'},
*** val2 = {doc1.field1, '0101'},
*** val3 = {doc1.field1, '1011'}
* when the search is done, the final score for the document must be
calculated based on the bit combination of scores, eg:
** query = 'val1, val2', res = {doc1, '0001'} (0011 & 0101)
** query = 'val1, val3', res = {doc1, '0011'} (0011 & 1011)
How do I implement the above scoring logic? Thanks,
Vlad
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]