Grant Ingersoll wrote:
I haven't looked at your latest patch yet, so this is just guesswork,
but was thinking in TermScorer, around line 75 or so, we could add:
score *= similarity.scorePayload(payloadBuffer);
TermScorer currently doesn't iterate over the positions. It uses a
buffer to load 32 doc/freq pairs from TermDocs using the read() method.
In order to use per-term boosts you would have to change the TermScorer
to not use a buffer anymore and use TermDocs.next() instead. Then you
can iterate over the positions and get the payloads. This is a
significant change to TermScorer and performance would probably suffer
for indexes that don't have payloads. I actually admit that I had the
same in mind (I mentioned that in LUCENE-761), but after looking closer
at TermScorer I changed my mind here.
I believe the better option is to create a new scorer subclass like
WeightedTermScorer which should be used if payloads containing per-term
boosts are stored in the index.
- Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]