[
https://issues.apache.org/jira/browse/SOLR-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060227#comment-13060227
]
Yonik Seeley commented on SOLR-2636:
------------------------------------
bq. @yonik Would it make sense for SolrQueryParser to just call makeQueryable?
I don't think so... it's useful to be able to parse negative queries, either
for fragments to add into a larger query (think bq in dismax, etc). Also, the
filter query code sees negative queries and looks them up (and caches them) as
their positive counterpart (so fq=foo and fq=-foo will only take up a single
cache entry).
I think your patch is fine.
> Explain doesn't deal with negative only queries completely correctly
> --------------------------------------------------------------------
>
> Key: SOLR-2636
> URL: https://issues.apache.org/jira/browse/SOLR-2636
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 3.2
> Reporter: Tom Hill
> Assignee: Yonik Seeley
> Priority: Trivial
> Attachments: SOLR-2636
>
>
> If you do a negative only query, such as -author:[* TO *], explain returns
> NaN for the score. The query executes correctly, however.
> To execute negative only queries, Solr calls QueryUtils.makeQueryable, and
> everything works correctly. But explain doesn't call this, and coord ends up
> dividing by zero.
> One could fix this by fixing the call to explain, which is easy, or perhaps
> by fixing the query parser to generate the query that way in the first place.
> (It looks like extended dismax does the latter, and so shouldn't have
> problems).
--
This message is automatically generated by JIRA.
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]