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

Chongchen Chen commented on SOLR-12069:
---------------------------------------

Hi, I have resolved this bug. [pull 
request|https://github.com/apache/lucene-solr/pull/833]

> Default operator parameter q.op ignored.
> ----------------------------------------
>
>                 Key: SOLR-12069
>                 URL: https://issues.apache.org/jira/browse/SOLR-12069
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 7.2
>            Reporter: Christoph Strobl
>            Priority: Critical
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The {{q.op}} parameter as described in the [7.2 reference for the Standard 
> Query 
> Parser|http://lucene.apache.org/solr/guide/7_2/the-standard-query-parser.html#standard-query-parser-parameters]
>  does not get used when executing a query.
> Reproduce via _techproducts_ example.
>  # {{./bin/solr -e tchproducts}}
>  # {{./bin/post -c techproducts example/exampledocs/*.xml}}
>  # {{http "http://localhost:8983/solr/techproducts/select?q=inStock:(true 
> false)&q.op=AND"}}
> The search above is expected to return {{0}} results but instead matches all 
> {{21}} entries.
> The response header lists the {{q.op}} parameter 
> {code:javascript}
> {
>   "responseHeader": {
>     "QTime": 3,
>     "params": {
>       "debugQuery": "on",
>       "q": "inStock:(true false)",
>       "q.op": "AND"
>     },
>     "status": 0
>   },
>   // ...
> }
> {code}
> The debug output is as follows:
> {code:javascript}
> debug": {
>   "QParser": "LuceneQParser",
>   "explain": {
>       "100-435805": "\n1.5869651 = sum of:\n  1.5869651 = weight(inStock:F in 
> 31) [SchemaSimilarity], result of:\n    1.5869651 = score(doc=31,freq=1.0 = 
> termFreq=1.0\n), product of:\n      1.5869651 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        4.0 = docFreq\n  
>       21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n",
>       "6H500F0": "\n0.22884157 = sum of:\n  0.22884157 = weight(inStock:T in 
> 2) [SchemaSimilarity], result of:\n    0.22884157 = score(doc=2,freq=1.0 = 
> termFreq=1.0\n), product of:\n      0.22884157 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        17.0 = docFreq\n 
>        21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n",
>       "EN7800GTX/2DHTV/256M": "\n1.5869651 = sum of:\n  1.5869651 = 
> weight(inStock:F in 30) [SchemaSimilarity], result of:\n    1.5869651 = 
> score(doc=30,freq=1.0 = termFreq=1.0\n), product of:\n      1.5869651 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n     
>    4.0 = docFreq\n        21.0 = docCount\n      1.0 = tfNorm, computed as 
> (freq * (k1 + 1)) / (freq + k1) from:\n        1.0 = termFreq=1.0\n        
> 1.2 = parameter k1\n        0.0 = parameter b (norms omitted for field)\n",
>       "F8V7067-APL-KIT": "\n1.5869651 = sum of:\n  1.5869651 = 
> weight(inStock:F in 3) [SchemaSimilarity], result of:\n    1.5869651 = 
> score(doc=3,freq=1.0 = termFreq=1.0\n), product of:\n      1.5869651 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n     
>    4.0 = docFreq\n        21.0 = docCount\n      1.0 = tfNorm, computed as 
> (freq * (k1 + 1)) / (freq + k1) from:\n        1.0 = termFreq=1.0\n        
> 1.2 = parameter k1\n        0.0 = parameter b (norms omitted for field)\n",
>       "GB18030TEST": "\n0.22884157 = sum of:\n  0.22884157 = weight(inStock:T 
> in 0) [SchemaSimilarity], result of:\n    0.22884157 = score(doc=0,freq=1.0 = 
> termFreq=1.0\n), product of:\n      0.22884157 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        17.0 = docFreq\n 
>        21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n",
>       "IW-02": "\n1.5869651 = sum of:\n  1.5869651 = weight(inStock:F in 4) 
> [SchemaSimilarity], result of:\n    1.5869651 = score(doc=4,freq=1.0 = 
> termFreq=1.0\n), product of:\n      1.5869651 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        4.0 = docFreq\n  
>       21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n",
>       "MA147LL/A": "\n0.22884157 = sum of:\n  0.22884157 = weight(inStock:T 
> in 5) [SchemaSimilarity], result of:\n    0.22884157 = score(doc=5,freq=1.0 = 
> termFreq=1.0\n), product of:\n      0.22884157 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        17.0 = docFreq\n 
>        21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n",
>       "SP2514N": "\n0.22884157 = sum of:\n  0.22884157 = weight(inStock:T in 
> 1) [SchemaSimilarity], result of:\n    0.22884157 = score(doc=1,freq=1.0 = 
> termFreq=1.0\n), product of:\n      0.22884157 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        17.0 = docFreq\n 
>        21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n",
>       "TWINX2048-3200PRO": "\n0.22884157 = sum of:\n  0.22884157 = 
> weight(inStock:T in 17) [SchemaSimilarity], result of:\n    0.22884157 = 
> score(doc=17,freq=1.0 = termFreq=1.0\n), product of:\n      0.22884157 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n     
>    17.0 = docFreq\n        21.0 = docCount\n      1.0 = tfNorm, computed as 
> (freq * (k1 + 1)) / (freq + k1) from:\n        1.0 = termFreq=1.0\n        
> 1.2 = parameter k1\n        0.0 = parameter b (norms omitted for field)\n",
>       "VS1GB400C3": "\n0.22884157 = sum of:\n  0.22884157 = weight(inStock:T 
> in 18) [SchemaSimilarity], result of:\n    0.22884157 = score(doc=18,freq=1.0 
> = termFreq=1.0\n), product of:\n      0.22884157 = idf, computed as log(1 + 
> (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n        17.0 = docFreq\n 
>        21.0 = docCount\n      1.0 = tfNorm, computed as (freq * (k1 + 1)) / 
> (freq + k1) from:\n        1.0 = termFreq=1.0\n        1.2 = parameter k1\n   
>      0.0 = parameter b (norms omitted for field)\n"
>   },
>   "parsedquery": "+(+(inStock:true inStock:false))",
>   "parsedquery_toString": "+(+(inStock:T inStock:F))",
>   "querystring": "inStock:(true false)",
>   "rawquerystring": "inStock:(true false)",
>   "timing": {
>      // ...
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to