doc1
:
doc1#chunk1
doc1_chunk1
doc1___chunk1
doc1:chunk1
doc1chunk1
doc1#v1#chunk1
and doc1#v2#chunk1
can represent different versions of the first chunk of doc1
.
list
operation (Python or REST API) or the listPaginated
operation (Node.js) with the namespace
and prefix
parameters to fetch the IDs of the records.
list
and listPaginated
operations are supported only for serverless indexes.pagination_token
that you can use to get the next batch of IDs. For more details, see Paginate through list results
With the record IDs, you can then use the fetch
operation to fetch the content of the records.
doc1#
), but it’s also possible to work with more complex, multi-level prefixes.
For example, let’s say you use the prefix pattern document#version#chunk
to differentiate between different versions of a document. If you wanted to delete all records for one version of a document, first list the record IDs based on the relevant document#version#
prefix and then delete the records by ID:
doc1#
part of the prefix that is common to all versions and then delete the records by ID:
list
operation does not support pod-based indexes. Instead of using ID prefixes to reference parent documents, use a metadata key-value pair. If you later need to delete the records, you can pass a metadata filter expression to the delete
operation.