Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6.0, 7.6.2, 7.6.1
-
Untriaged
-
0
-
Unknown
Description
The following query works as expected (it provides a filter for high selectivity) in other words I am forcing the brightness to be < 20.
SELECT id, color, verbs, brightness
|
FROM `vector-sample`.color.rgb AS t1
|
WHERE
|
brightness < 20
|
AND SEARCH(t1, {
|
"query": { "match_none": {} },
|
"knn_operator": "and",
|
"knn": [
|
{
|
"field": "colorvect_l2",
|
"vector": [0.0, 0.0, 127.7],
|
"k": 3
|
}, {
|
"field": "colorvect_dot",
|
"vector": [0.0, 0.0, 1.0],
|
"k": 3
|
}
|
]
|
})
|
But If I add an index here I just use the index advisor
CREATE INDEX adv_brightness ON `default`:`vector-sample`.`color`.`rgb`(`brightness`)
|
And re-run the same query I get a different result.
The FTS index definition:
{ "type": "fulltext-index", "name": "vector-sample.color.color_vector_index", "sourceType": "gocbcore", "sourceName": "vector-sample", "planParams": \{ "maxPartitionsPerPIndex": 512, "indexPartitions": 2 }
|
,
|
"params": {
|
"doc_config":
|
{ "docid_prefix_delim": "", "docid_regexp": "", "mode": "scope.collection.type_field", "type_field": "type" }
|
,
|
"mapping": {
|
"analysis": {},
|
"default_analyzer": "standard",
|
"default_datetime_parser": "dateTimeOptional",
|
"default_field": "_all",
|
"default_mapping": {
|
"dynamic": false,
|
"enabled": false
|
},
|
"default_type": "_default",
|
"docvalues_dynamic": false,
|
"index_dynamic": false,
|
"store_dynamic": false,
|
"type_field": "_type",
|
"types": {
|
"color.rgb": {
|
"dynamic": false,
|
"enabled": true,
|
"properties": {
|
"brightness": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{ "index": true, "name": "brightness", "store": true, "type": "number" }
|
]
|
},
|
"color": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{ "analyzer": "en", "index": true, "name": "color", "store": true, "type": "text" }
|
]
|
},
|
"colorvect_dot": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{ "dims": 3, "index": true, "name": "colorvect_dot", "similarity": "dot_product", "type": "vector" }
|
]
|
},
|
"colorvect_l2": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{ "dims": 3, "index": true, "name": "colorvect_l2", "similarity": "l2_norm", "type": "vector" }
|
]
|
},
|
"embedding_vector_dot": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{ "dims": 1536, "index": true, "name": "embedding_vector_dot", "similarity": "dot_product", "type": "vector" }
|
]
|
},
|
"wheel_pos": {
|
"dynamic": false,
|
"enabled": true,
|
"fields": [
|
{ "analyzer": "en", "index": true, "name": "wheel_pos", "store": true, "type": "text" }
|
]
|
}
|
}
|
}
|
}
|
},
|
"store": {
|
"indexType": "scorch",
|
"segmentVersion": 16
|
}
|
},
|
"sourceParams": {}
|
}
|
The fts data is attached as "rgb.json"
Attachments
Issue Links
- is duplicated by
-
MB-62917 Getting more than k results while doing knn with an extra where clause, involving FTS + GSI indexes
- Closed
For Gerrit Dashboard: MB-62401 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
213879,4 | MB-62401: Adapting response of Sargable + SargableFlex | trinity | n1fty | Status: MERGED | +2 | +1 |
213881,9 | MB-62401: Handle Search() KNN | trinity | query | Status: MERGED | +2 | +1 |
213954,1 | Merge remote-tracking branch 'couchbase/trinity' into cypher | cypher | query | Status: MERGED | +2 | +1 |
213955,2 | Merge remote-tracking branch 'couchbase/trinity' | master | n1fty | Status: MERGED | +2 | +1 |
213956,1 | Merge remote-tracking branch 'couchbase/cypher' | master | query | Status: MERGED | +2 | +1 |
213958,2 | MB-62401: Fix unit tests on account of API change | trinity | n1fty | Status: MERGED | +2 | +1 |
214336,2 | MB-62401: Fix knn unit test on account of API change | trinity | n1fty | Status: MERGED | +2 | +1 |
214337,1 | Merge remote-tracking branch 'couchbase/trinity' | master | n1fty | Status: MERGED | +2 | +1 |