Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12069

Default operator parameter q.op ignored.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 7.2
    • Fix Version/s: None
    • Component/s: query parsers
    • Labels:
      None

      Description

      The q.op parameter as described in the 7.2 reference for the Standard Query Parser does not get used when executing a query.

      Reproduce via techproducts example.

      1. ./bin/solr -e tchproducts
      2. ./bin/post -c techproducts example/exampledocs/*.xml
      3. 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 

      {
        "responseHeader": {
          "QTime": 3,
          "params": {
            "debugQuery": "on",
            "q": "inStock:(true false)",
            "q.op": "AND"
          },
          "status": 0
        },
        // ...
      }
      

      The debug output is as follows:

      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": {
           // ...
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cstrobl Christoph Strobl
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m