Query and search
Use these query and search how-to guides to find the data you want.
Learn fundamental search syntax and how to retrieve specific object properties.
Ask questions in plain English - automatically translates to optimized Weaviate queries.
Find objects based on vector embedding similarity using `nearVector`, `nearObject`, etc.
Perform vector similarity searches using images as the query input.
Search using audio or video files as query inputs with multimedia search.
Execute keyword searches ranked relevance using the BM25F algorithm.
Combine keyword (BM25F) and vector similarity search results with fusion algorithms.
Use search results to provide context and augment prompts for Large Language Models.
Promote or demote matching results by recency, popularity or a filter, without removing them.
Refine and re-order search results using integrated reranker modules.
Search several named vectors at once and combine their scores.
Get per-shard timing breakdowns to find out where a slow query spends its time.
Perform aggregate operations like count, mean, sum, etc., on search result sets.
Apply conditional filters, such as `where` clauses, to narrow down search results.
Which search type?
| Search type | What it matches | Use it when | Cost |
|---|---|---|---|
| Vector | Meaning, through vector distance | The wording of the query and the data differ, or the data is not text | One vector search per query |
| Keyword (BM25) | Exact terms, ranked by BM25F | Names, codes, error strings, or any term that must appear literally | Inverted index lookup |
| Hybrid | Both, fused into one ranking | You want one query to handle both cases. A good default for text search | Both of the above, plus fusion |
| Boost | The search above, re-scored | Ranking should also reflect recency, popularity or a category, without dropping anything | In-memory rescoring of the candidates |
| Rerank | The search above, re-ordered by a model | Precision at the top of the list matters more than latency | One model call per query |
Boost and rerank are second-stage operations: they reorder what the first search retrieved. Neither adds results, so if an object is not in the initial result set, neither can pull it in. Use a filter when a condition must remove objects instead of demoting them.
Questions and feedback
Have a question or feedback? Here's how to reach us.
