lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Deck (JIRA)" <>
Subject [jira] [Commented] (SOLR-1485) PayloadTermQuery support
Date Fri, 01 Jun 2012 13:18:24 GMT


Roland Deck commented on SOLR-1485:

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:

  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)),
            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
> PayloadTermQuery support
> ------------------------
>                 Key: SOLR-1485
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Erik Hatcher
>         Attachments:
> Solr currently has no support for Lucene's PayloadTermQuery, yet it has support for indexing

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message