Query by meta Id doesnt return document

i have some index in my cluster CB 4.5.1
SGW version 1.3.1

i did a query by meta().id for one document but doesn’t return anything

Query
SELECT * FROM bucket WHERE meta(bucket).id IN [“DocumentId”]

however when i do a get request in Sync gateway API return the document

any idea what happen ?

It should have given the document Is Index has built.

You can try this

SELECT * FROM bucket USE KEYS ["DocumentId"];

hi @vsr1 thanks for you soon reply
it works :clap::open_hands:
document doesn’t entry in the index ?
however why for others documents with the same structure my query works and only for these document don’t run ?

Indexer may not caught up to date. Did you see any errors in indexer.log. cc @deepkaran.salooja

i don’t see any error in indexer.log

i searched in error.log
20 days ago was the last error index and the document that don’t return by index was created yesterday

however yesterday my Memory RAM was closed to max capacity and display error
Hard Out Of Memory Error. Bucket “bucket” on node 127.0.0.0.1 is full. All memory allocated to this bucket is used for metadata

may be by this reason indexer not caught the document

Thanks for info. i have tagged @deepkaran.salooja , he might have idea.
Is document is JOSN document. If you know document keys you can do dummy update and see if the indexer reindexes it, Or you can drop and recreate indexes.

UPDATE bucket AS t USE KEYS [“DocumentId”] UNSET t.xxxx;

1 Like

yes i did dummy update however didn’t works the index didn’t catch it
today i checked and this occurred in at least 30 documents more
i am worried :frowning:
@vsr1

note:
the meta id not is the only field that index dont catch
i query documents by other fields and its the same
i didnt get some documents

it look like the index don’t work good

@vsr1 @deepkaran.salooja
any idea ? :disappointed_relieved:

Requesting @prathibha for inputs.

1 Like

@EduardoCamargo, please check on the UI mini-graphs for the index if there are any “items remaining”.

Can you post your exact index definition and one of the document which doesn’t get indexed?

Are you using CE or EE?

1 Like

@EduardoCamargo: Can you please share the indexer log as well?

1 Like

@deepkaran.salooja @prathibha
yes in the mini graphs i had items remaining like 7.5K
however i did upgrade to Couchbase server 4.6.5 and the problem disappeared
i had 4.5.1
thanks for all