Hello,
I am denormalizing a map of <string,float> into a single lucene document
by storing it as "key1|score1 key2|score2 ...". In Solr, I pull this in
using the following analyzer definition.
<fieldtype name="payloads" stored="false" indexed="true"
class="solr.TextField" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.DelimitedPayloadTokenFilterFactory"
delimiter="|" encoder="float"/>
</analyzer>
</fieldtype>
I have my own PayloadSimilarity which overrides scorePayload.
The index is created by POSTing Solr XML to Solr.
In Solr, I have a custom QParser that converts any query containing a
field of type payloads into a PayloadTermQuery instead of a TermQuery
(multiple sub-queries are combined using a BooleanQuery).
However, in Luke, when I put my custom PayloadSimilarity and a custom
PayloadAnalyzer (equivalent to the chain above) in the classpath and
enter the same field:value query and the results don't come back ordered
by the payload score. I do set the analyzer to my payload analyzer and
the similarity to my payload similarity.
I guess this is expected as there is no way (that I know of anyway) for
me to tell Luke that this is a PayloadTermQuery rather than a TermQuery.
So the question is - can I use some special syntax to indicate to Luke
that the query should be converted to a PayloadTermQuery?
Don't think Luke can figure out based on the definition (in Luke I see
the field defined as ITS).
Thanks
Sujit