We have used prepared statements with adhoc=false. The queries are paramterized. The query fails to work sometimes with error code 12016 “Index Not Found - cause: queryport.indexNotFound”.
We are using CB EE v 6.5.1.
This query fails intermittently and then we need to delete the prepared statements from system:prepareds.
What could be the reason for this behavior and a potential fix.
Update default as d use keys
(select raw meta().id as i from default s
set d.key3 = $Val3
CREATE INDEX idx_test on default(key1,key2) where docType=‘testUpdate’
Could this be because of not putting alias ‘s’ inside meta().id to meta(s).id
The failing query from SDK works fine in workbench without doing any cache clean or adding s to meta().id. The workbench query picks up the expected index as well