Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.0.3, 7.1.0
-
Untriaged
-
1
-
Unknown
Description
The two queries should be identical
Note, I am testing with an FTS index on `travel-sample`.inventory.landmark with a dynamic type mapping on inventory.landmark.
this is correct
SELECT /* h.content, */ h.id AS _id, SEARCH_SCORE() AS _score
|
FROM `travel-sample`.inventory.landmark AS h
|
WHERE SEARCH(h.content, "+paris +notre +dame")
|
_id _score
|
25933 2.7195699184273776
|
21782 1.6599383892495942
|
21603 2.5323457161345346
|
this is incorrect
SELECT /* h.content, */ h.id AS _id, SEARCH_SCORE() AS _score
|
FROM `travel-sample`.inventory.landmark AS h
|
WHERE SEARCH(h.content, {"query": "+paris +notre +dame"})
|
ORDER BY _score DESC
|
_id _score
|
21603 1.7580958760961103
|
21752 1.6636198923208063
|
21867 1.5309311435541715
|
21864 1.2123922761691992
|
21782 1.0390219329977914
|
25933 1.0103269228837675
|
21688 0.8761105647604155
|
21788 0.706441693239785
|
both should operate like the following curl payload
{
"explain": false,
"fields": [
"*"
],
"highlight": {},
"query": {
"query": "+content:paris +content:notre +content:dame"
},
"size": 10,
"from": 0,
"sort": [
"-_score"
]
}
Attachments
For Gerrit Dashboard: MB-51434 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
172216,5 | MB-51434: Fix field scope when query string query fed in as object | master | n1fty | Status: MERGED | +2 | +1 |