Seems like there is a bug with q.op=AND and edismax.
If I understand this correctly, these queries should return the same result:
1) q="a AND b"
2) q="a b" q.op=AND
This is not the case with edismax (using solr 8, LUCENE_VERSION: 8_0_0 ->
had the same problem at least since 7.1)
Query 2) requires to find both a and b in the same field.
Note: this works correctly with queryparser dismax: the results of 1) will
be the same as 2).

Example queries:

// q="146762084 AND t27"
// http:.../select?debugQuery=on&q=146762084%20AND%20t27&defType=edismax

{
  "response": {
    "numFound": 1,
    "start": 0,
    "docs": [
      {
        "id": "146762084"
      }
    ]
  },
  "debug": {
    "rawquerystring": "146762084 AND t27",
    "querystring": "146762084 AND t27",
    "parsedquery": "+(+DisjunctionMaxQuery(((id:146762084)^200.0 |
body:146762084)) +DisjunctionMaxQuery(((id:t27)^200.0 | (+body:t
+body:27))))",
    "parsedquery_toString": "+(+((id:146762084)^200.0 | body:146762084)
+((id:t27)^200.0 | (+body:t +body:27)))",
    "QParser": "ExtendedDismaxQParser"
  }
}


//q="146762084 t27"
//q.op=AND
// http:.../select?debugQuery=on&q=146762084%20t27&q.op=AND&defType=edismax

{
  "response": {
    "numFound": 0,
    "start": 0,
    "docs": [

    ]
  },
  "debug": {
    "rawquerystring": "146762084 t27",
    "querystring": "146762084 t27",
    "parsedquery": "+(+DisjunctionMaxQuery(((+id:146762084 +id:t27)^200.0 |
(+body:146762084 +body:t +body:27))))",
    "parsedquery_toString": "+(+((+id:146762084 +id:t27)^200.0 |
(+body:146762084 +body:t +body:27)))",
    "QParser": "ExtendedDismaxQParser"
  }
}

Anyone else seen the same? 

Any pointers will be appreciated. 

Thanks, 
Henrik



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to