A field query searches a specific field like title:"air max" or brand:Nike. In stores, it powers advanced search and precise matches for titles, SKUs, and attributes.
A field query (fielded search) targets one or more specific fields in the index using prefixes or a query DSL, e.g., title:
, brand:
, sku:
, category:
, price:
. It gives precise control compared to a general, all-fields query.
title:"air max"
), filters (price:[50 TO 100]
), and exact fields (sku:"AB-1234"
).title:"air max 270" AND brand:Nike AND price:[80 TO 150]
sku:AB-1234
→ exact keyword field.category:Accessories AND color:Red
Field queries offer surgical control over where and how search matches happen. Expose the right fields with the right analyzers, sanitize inputs, and provide a good UI for non-experts.
Field query vs filter?
Field queries target searchable fields and can affect scoring; filters constrain results without affecting text scores.
Should customers see this?
Offer a friendly builder for shoppers; keep raw syntax for admins and power users.
How does this interact with boosting?
Use BM25F/field boosts so title:
matches carry more weight than description:
.