RE: Simple payloads example not working

2014-01-14 Thread michael.boom
Investigating, it looks that the payload.bytes property is where the problem is. payload.toString() outputs corrects values, but .bytes property seems to behave a little weird: public class CustomSimilarity extends DefaultSimilarity { @Override public float scorePayload(int doc, int

RE: Simple payloads example not working

2014-01-14 Thread Markus Jelsma
Subject: RE: Simple payloads example not working Investigating, it looks that the payload.bytes property is where the problem is. payload.toString() outputs corrects values, but .bytes property seems to behave a little weird: public class CustomSimilarity extends DefaultSimilarity

RE: Simple payloads example not working

2014-01-14 Thread michael.boom
Yes, it's float: filter class=solr.DelimitedPayloadTokenFilterFactory encoder=float delimiter=|/ The scenario is simple to replicate - default solr-4.6.0 example, with a custom Similarity class (the one above) and a custom queryparser (again, listed above). I posted the docs in XML format (docs

RE: Simple payloads example not working

2014-01-14 Thread michael.boom
Hi Markus, Do you have any example/tutorials of your payloads in custom filter implementation ? I really want to get payloads working, in any way. Thanks! - Thanks, Michael -- View this message in context:

Re: Simple payloads example not working

2014-01-14 Thread Ahmet Arslan
Hi Michael   Did you re-index after you register your custom similarity? Ahmet On Tuesday, January 14, 2014 4:36 PM, michael.boom my_sky...@yahoo.com wrote: Hi Markus, Do you have any example/tutorials of your payloads in custom filter implementation ? I really want to get payloads

Re: Simple payloads example not working

2014-01-14 Thread michael.boom
Hi Ahmet, Yes, I did, also tried various scenarios with the same outcome. I used the stock example, with minimum customization ( custom similarity and query parser ). - Thanks, Michael -- View this message in context:

Re: Simple payloads example not working

2014-01-13 Thread michael.boom
Actually, i just checked the debugQuery output: they all have the same score: explain: { 1: \n0.24276763 = (MATCH) weight(text:testone in 0) [DefaultSimilarity], result of:\n 0.24276763 = fieldWeight in 0, product of:\n1.0 = tf(freq=1.0), with freq of:\n 1.0 = termFreq=1.0\n

Re: Simple payloads example not working

2014-01-13 Thread Ahmet Arslan
Hi Michael, To make payloads to be considered in score calculation you need two more things: 1) A custom similarity  2) A query parser that produces Payload*Query family. This blog post can be a good start point. 

Re: Simple payloads example not working

2014-01-13 Thread michael.boom
Thanks iorixxx, Actually I've just tried it and I hit a small wall, the tutorial looks not to be up to date with the codebase. When implementing my custom similarity class i should be using PayloadHelper, but following happens: in PayloadHelper: public static final float decodeFloat(byte []

RE: Simple payloads example not working

2014-01-13 Thread Markus Jelsma
1.0f; } -Original message- From:michael.boom my_sky...@yahoo.com Sent: Monday 13th January 2014 14:49 To: solr-user@lucene.apache.org Subject: Re: Simple payloads example not working Thanks iorixxx, Actually I've just tried it and I hit a small wall, the tutorial looks

RE: Simple payloads example not working

2014-01-13 Thread michael.boom
Thanks, that indeed fixed the problem. Now i've created a custom Similarity class and used it in schema.xml. Problem is now that for all docs the calculated payload score is the same: public class CustomSolrSimilarity extends DefaultSimilarity { @Override public float

Re: Simple payloads example not working

2014-01-13 Thread Erik Hatcher
There’s also the PayloadTermQueryParser here https://issues.apache.org/jira/browse/SOLR-1485 (which is surely a bit out of date as well, but maybe a bit simpler starting point). Erik On Jan 13, 2014, at 12:30 AM, michael.boom my_sky...@yahoo.com wrote: Actually, i just checked the

Re: Simple payloads example not working

2014-01-13 Thread michael.boom
Thanks Eric, I did create a custom query parser, which seems to work just fine. My only problem now is the one above, with all docs having the same score for some reason. See below the query parserL import org.apache.commons.lang.StringUtils; import org.apache.lucene.index.Term; import

RE: Simple payloads example not working

2014-01-13 Thread michael.boom
Correction: I observed a pattern, the returned score is the same for all docs and equals with the payload of the term in the first doc: http://localhost:8983/solr/collection1/pds-search?q=payloads:testonewt=jsonindent=truedebugQuery=true --- explain:{ 1:\n15.4 = (MATCH)