Inconsistent result from index query

hey

i am using couch base 6.0 , i got bucket with 9 documents and index on one of the attributes ,
i got a strange behavior in my production ,
one in a while i am getting no result from the index query and key was not found , this is a very simple query on the index select * from `` where apikey=’’
and right after the query work and return data
it happen on %1 of the query…
i looked at the server statistics and look like the index is working , but no data found…
how can i try to approach it ?

post the explain of query and index definition.
Execute query through UI and check Plan Text tab for successful and no data see where the issues is. InItems/OutItems

{
“plan”: {
#operator”: “Sequence”,
“~children”: [
{
#operator”: “IndexScan3”,
“index”: “idx_apiKey”,
“index_id”: “fe902f713c3dc054”,
“index_projection”: {
“primary_key”: true
},
“keyspace”: “hubspot-integration”,
“namespace”: “default”,
“spans”: [
{
“exact”: true,
“range”: [
{
“high”: ““c69aac1b-3e76-4b0d-9325-febcbe3cf32b””,
“inclusion”: 3,
“low”: ““c69aac1b-3e76-4b0d-9325-febcbe3cf32b””
}
]
}
],
“using”: “gsi”
},
{
#operator”: “Fetch”,
“keyspace”: “hubspot-integration”,
“namespace”: “default”
},
{
#operator”: “Parallel”,
“~child”: {
#operator”: “Sequence”,
“~children”: [
{
#operator”: “Filter”,
“condition”: “((hubspot-integration.apikey) = “c69aac1b-3e76-4b0d-9325-febcbe3cf32b”)”
},
{
#operator”: “InitialProject”,
“result_terms”: [
{
“expr”: “self”,
“star”: true
}
]
},
{
#operator”: “FinalProject”
}
]
}
}
]
},
“text”: “select * from hubspot-integration where apikey=‘c69aac1b-3e76-4b0d-9325-febcbe3cf32b’”
}

Plan looks fine. Follow steps described in previous post

at the the end it was code problem,:slight_smile: