Skip to main content
Prerequisites
TopK supports keyword search with the BM25 ranking function. To perform a keyword search on your documents, use the match() function. Define a schema with a text() field and add a keyword_index():
To run a keyword search on the title and description fields using the match() function. We’ll query the collection to match the term "great" in the title field or the term "novel" in any of the keyword-indexed text fields:
The match() function will by default execute against all fields with a keyword index.
TopK provides a powerful keyword search API allowing you to customize your search queries. Read more about keyword search here.