[ 
https://issues.apache.org/jira/browse/SOLR-7249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365962#comment-14365962
 ] 

Erick Erickson commented on SOLR-7249:
--------------------------------------

Hmmm, this appears the same as SOLR-3377, but that bug was fixed in 4.0-BETA. 
Possibly a regression?

> Solr engine misses null-values in "OR null" part for eDisMax parser
> -------------------------------------------------------------------
>
>                 Key: SOLR-7249
>                 URL: https://issues.apache.org/jira/browse/SOLR-7249
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.10.3
>         Environment: Windows 7
> CentOS 6.6
>            Reporter: Arsen Li
>
> Solr engine misses null-values in "OR null" part for eDisMax parser
> For example, I have following query:
> ((*:* AND -area:[* TO *]) OR area:[100 TO 300]) AND objectId:40105451
> full query path visible in Solr Admin panel is
> select?q=((*%3A*+AND+-area%3A%5B*+TO+*%5D)+OR+area%3A%5B100+TO+300%5D)+AND+objectId%3A40105451&wt=json&indent=true
> debug part of response is below:
> --------------------------------------
> "rawquerystring": "((*:* AND -area) OR area:[100 TO 300]) AND 
> objectId:40105451",
>     "querystring": "((*:* AND -area) OR area:[100 TO 300]) AND 
> objectId:40105451",
>     "parsedquery": "+((+MatchAllDocsQuery(*:*) -text:area) area:[100 TO 300]) 
> +objectId:40105451",
>     "parsedquery_toString": "+((+*:* -text:area) area:[100 TO 300]) 
> +objectId: \u0001\u0000\u0000\u0000\u0000\u0000\u0013\u000fkk",
>     "explain": {
>       "40105451": "\n14.3509865 = (MATCH) sum of:\n  0.034590688 = (MATCH) 
> product of:\n    0.069181375 = (MATCH) sum of:\n      0.069181375 = (MATCH) 
> sum of:\n        0.069181375 = (MATCH) MatchAllDocsQuery, product of:\n       
>    0.069181375 = queryNorm\n    0.5 = coord(1/2)\n  14.316396 = (MATCH) 
> weight(objectId: \u0001\u0000\u0000\u0000\u0000\u0000\u0013\u000fkk in 
> 1109978) [DefaultSimilarity], result of:\n    14.316396 = 
> score(doc=1109978,freq=1.0), product of:\n      0.9952025 = queryWeight, 
> product of:\n        14.38541 = idf(docFreq=1, maxDocs=1300888)\n        
> 0.069181375 = queryNorm\n      14.38541 = fieldWeight in 1109978, product 
> of:\n        1.0 = tf(freq=1.0), with freq of:\n          1.0 = 
> termFreq=1.0\n        14.38541 = idf(docFreq=1, maxDocs=1300888)\n        1.0 
> = fieldNorm(doc=1109978)\n"
>     },
>     "QParser": "LuceneQParser",
> ...
> --------------------------------------
> so, it should return record if area between 100 and 300 or area not declared.
> it works ok for default parser, but when I set "edismax" checkbox checked in 
> Solr admin panel - it returns nothing ("area" for objectId=40105451 is null). 
> Request path is following
> select?q=((*%3A*+AND+-area%3A%5B*+TO+*%5D)+OR+area%3A%5B100+TO+300%5D)+AND+objectId%3A40105451&wt=json&indent=true&defType=edismax&stopwords=true&lowercaseOperators=true
> debug response is below
> --------------------------------------
>  "rawquerystring": "((*:* AND -area) OR area:[100 TO 300]) AND 
> objectId:40105451",
>     "querystring": "((*:* AND -area) OR area:[100 TO 300]) AND 
> objectId:40105451",
>     "parsedquery": "(+(+((+DisjunctionMaxQuery((text:*\\:*)) 
> -DisjunctionMaxQuery((text:area))) area:[100 TO 300]) 
> +objectId:40105451))/no_coord",
>     "parsedquery_toString": "+(+((+(text:*\\:*) -(text:area)) area:[100 TO 
> 300]) +objectId: \u0001\u0000\u0000\u0000\u0000\u0000\u0013\u000fkk)",
>     "explain": {},
>     "QParser": "ExtendedDismaxQParser",
>     "altquerystring": null,
>     "boost_queries": null,
>     "parsed_boost_queries": [],
>     "boostfuncs": null,
> --------------------------------------
> However, when I move query from "q" field to "q.alt" field - it works ok, 
> query is
> select?wt=json&indent=true&defType=edismax&q.alt=((*%3A*+AND+-area%3A%5B*+TO+*%5D)+OR+area%3A%5B100+TO+300%5D)+AND+objectId%3A40105451&stopwords=true&lowercaseOperators=true
> note, asterisks are not saved by editor, refer to 
> http://stackoverflow.com/questions/29059460/solr-misses-or-null-query-when-parsing-by-edismax-parser
> if needed more accurate syntax



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to