const results = await table.findAndRerank({
category: 'books',
}, {
sort: { $hybrid: { vector: 'fantasy novels', text: 'dragons' } },
limit: 5,
timeout: 10000,
});
You can also use fluent builder methods on the cursor:
const cursor = table.findAndRerank({ category: 'books' })
.sort({ $hybrid: { vector: 'fantasy novels', text: 'dragons' } })
.limit(5)
.includeScores(true);
const results = await cursor.toArray();
Overview
The options for a
findAndRerankcommand on a Table.