You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by hariistou <ha...@gmail.com> on 2013/04/25 15:52:43 UTC

Re: Did something change with Payloads?

Hi Jim,

I faced almost the same issue with payloads recently, and thought I would
rather write about it.
Please see the link below (my blog). I hope it helps.

http://hnagtech.wordpress.com/2013/04/19/using-payloads-with-solr-4-x/
<http://hnagtech.wordpress.com/2013/04/19/using-payloads-with-solr-4-x/>  

Additionally, like what Mark Miller has said, using Solr 4.x, you have to
add documents one by one during indexing, to reflect payload scores
correctly. Like say..

solr.addBean(doc);
solr.commit();

When you try to add documents as a collection through addBeans() there is
only one .PAY file created and all documents are scored as per the payload
score of the first document to be indexed.

There is surely some problem with Lucene 4.1 codec APIs. So for now the
above solution would work.
Probably, I need to write a sequel to my first article regarding the above
point on indexing. :)

Thanks,
Hari.







--
View this message in context: http://lucene.472066.n3.nabble.com/Did-something-change-with-Payloads-tp4049561p4058919.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Did something change with Payloads?

Posted by hariistou <ha...@gmail.com>.
Hi,

I realized that there was no mistake with the way Lucene writes
postings/payloads.
Rather, there is no flaw there.

The problem may be with the way the scorePayload() is implemented.
We need to use both payload.bytes, and payload.offset to compute the score.

So, please ignore my previous message in this thread.



--
View this message in context: http://lucene.472066.n3.nabble.com/Did-something-change-with-Payloads-tp4049561p4061030.html
Sent from the Solr - User mailing list archive at Nabble.com.