Ranking orders search results by estimated relevance to a query. A search engine indexes content, finds possible answers, then scores and sorts them so the strongest matches appear first. A score might reflect keyword matches or similarity between numerical representations of a query and a document. The scoring function can be adjusted for individual queries. section 3.0
Keep matching and ranking distinct. Matching filters documents to a set of possible answers; ranking scores and orders those answers. Filtering first can avoid scoring every document and supports counts and facets for exploring results. But a condition used as a filter removes documents outright, while a scoring feature changes their order. section 3.2.4 section 3.2.6
Books for a young audience
For a query such as “the cat in the hat,” filter to documents whose category is books and whose audience is kid. Requiring every query word in the description narrows the candidates further. The query can then score those candidates by relevance. If the words should influence order without excluding documents, use them as a scoring feature instead of a required match. section 3.2.6
Generic search request syntax:
{"query": "the cat in the hat",
"query_fields": ["description"],
"filters": [("category", "books"), ("audience", "kid")],
"min_match": "100%"}
Solr request syntax:
{"query": "the cat in the hat",
"filters": ["category:books", "audience:kid"],
"params": {"qf": ["description"],
"mm": "100%",
"defType": "edismax"}}
Compare the generic request with its Solr form: category and audience are explicit filters, while the query also filters and contributes to scoring. section 3.2.6
That dual role of the query parameter is convenient but can make advanced tuning harder. In Solr, filters can control eligibility while a boost query (`bq`) contributes to relevance without filtering. This lets a team change the ranking signal without unintentionally shrinking the result set. section 3.2.6
Generic text scores are a starting point, not a complete relevance strategy. Restaurant results may need proximity and dietary preferences; news may need freshness; product search may value likelihood of purchase. Add such domain-specific signals deliberately, and check whether filtering or scoring best expresses each requirement. section 3.3 section 3.2.6



