Is there any way to fetch all the documents loaded into vespa?
I tried querying with regular expressions, but it didn't work as expected.
select * from entity where ID matches "[.]+";
ID is not an attribute, but I tried with an attribute field, both didn't respond with any values.
Using visiting instead of search, either with the vespa-visit tool or using visiting in the document/v1 REST API is usually preferable for dumping documents.
If you want to use search, use this query to match all documents of a type:
select * from yourdocumenttype where sddocname contains 'yourdocumenttype';
To iterate over all documents with this, it will be more efficient to use a some field in your document to partition the document set into smaller chunks and query for one chunk at a time (e.g if you have a timestamp field, add a range condition to the query to retrieve documents for a slice of time in each query).
(Regular expressions are only supported in streaming mode.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With