[
https://issues.apache.org/jira/browse/SOLR-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287384#comment-13287384
]
Roland Deck commented on SOLR-1485:
-----------------------------------
Hi
I tried the PayloadTermQueryPlugin today.
To get the scores as mentioned above I had to change the code a little.
Here is the relevant code fragment:
@Override
public QParser createParser(String qstr, SolrParams localParams, SolrParams
params, SolrQueryRequest req) {
return new QParser(qstr, localParams, params, req) {
public Query parse() throws ParseException {
//rdeck: hint: lets try to set includeSpanCore to true. => Yes it
works! (after having re-indexed all documents)!
return new PayloadTermQuery(
new Term(localParams.get(QueryParsing.F),
localParams.get(QueryParsing.V)),
createPayloadFunction(localParams.get("func")),
true); //was originally false instead of true
}
};
}
with includeSpanCore = false, I get score = payload value
with includeSpanCore = true, the payload takes part on the score calculation
I have some questions left:
1) Why is the PayloadTermQuery limited to just one field? Or will this change?
2) How can I mix up queries containing parts which are payload dependent and
others which aren't?
> PayloadTermQuery support
> ------------------------
>
> Key: SOLR-1485
> URL: https://issues.apache.org/jira/browse/SOLR-1485
> Project: Solr
> Issue Type: New Feature
> Components: search
> Reporter: Erik Hatcher
> Attachments: PayloadTermQueryPlugin.java
>
>
> Solr currently has no support for Lucene's PayloadTermQuery, yet it has
> support for indexing payloads.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]