Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.0.4, 6.5.0, Cheshire-Cat
-
Untriaged
-
Yes
Description
https://forums.couchbase.com/t/couchbase-stops-using-index/25405
CREATE INDEX layer_record_nominativo ON production_tlp2020 ((distinct (array array_element for array_element in suffixes(upper((body.nominativo))) end))) WHERE (_type = "record"); |
|
select body.nominativo
|
from production_tlp2020
|
where ANY array_element IN SUFFIXES(UPPER(body.nominativo)) SATISFIES array_element like '%PIL%' END and _type='record'; |
|
select body.nominativo
|
from production_tlp2020 AS r
|
where ANY array_element IN SUFFIXES(UPPER(body.nominativo)) SATISFIES array_element like '%PIL%' END and _type='record'; |
After some time the index keys become as follows and index is not usable.
{
|
"condition": "(`_type` = \"record\")", |
"datastore_id": "http://127.0.0.1:8091", |
"id": "e8d75bf6bd5332a3", |
"index_key": [ |
"(distinct (array `array_element` for `array_element` in suffixes(upper((((((((((((((((((((((((`r`.`production_tlp2020`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`r`).`data`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`r`).`production_tlp2020`).`body`).`nominativo`))) end))" |
],
|
"keyspace_id": "production_tlp2020", |
"name": "layer_record_nominativo", |
"namespace_id": "default", |
"state": "online", |
"using": "gsi" |
}
|