liveBook · Manning

Index-time boosting

As explained in AI-Powered Search

Index-time boosting is a relevance technique that stores boost values with indexed documents so scoring can apply them without retrieving boost values during query execution.

Index-time boosting stores signals-derived boost values with indexed documents instead of loading them from a sidecar collection during query execution. A document receives query terms and weights; a later search matches the term and applies its indexed boost automatically. section 8.6 section 8.6.2

The indexing workflow is:

  • Generate document-and-query boost pairs with the same signals aggregations used for query-time boosting. section 8.6.2
  • Map each document’s eligible queries and weights into a dedicated field such as signals_boosts. section 8.6.2
  • Search that field with the user query so matching terms contribute their indexed payload to relevance scoring. section 8.6.2

A boosted product document

A popular iPad document can contain signals_boosts values such as “ipad|2939, ipad 2|1104, ipad2|540”. A search for “ipad” matches the indexed term and applies its associated weight. The query request can specify the signals_boosts field as the index-time boost field before searching the products collection. section 8.6.2

Listing 8.8 Indexing boosts into the main product collection
from aips.data_loaders import index_time_boosts

boosts_collection = engine.get_collection("normalized_signals_boosts")
create_view_from_collection(boosts_collection,  #1
                            boosts_collection.name)   #1

boosted_products_collection = \ 
  engine.get_collection("products_with_signals_boosts") 
create_view_from_collection(boosted_products_collection,   #2
                            boosted_products_collection.name)   #2

boosted_products = index_time_boosts.load_dataframe(  #3
  boosted_products_collection,  #3
  boosts_collection)  #3

boosted_products_collection.write(boosted_products) #4

Shows the Python data-loading step that combines generated boost values with product documents and writes the boosted collection. section 8.6.2

This shifts work from query execution to indexing. Queries become single searches rather than boost lookups followed by expanded boosted queries, improving speed, paging consistency, and completeness. The cost is reduced flexibility: changing a keyword’s boost can require reindexing every associated document, potentially the whole index during batch or continuous updates. section 8.6.3 section 8.6.3

How AI-Powered Search covers it

How deep it goes
Explains boost generation, document-field indexing, payload scoring, performance benefits, paging effects, and reindexing costs.
Examples
Uses a boosted iPad product document, signals_boosts payloads, and Python collection-indexing and search requests.
What it assumes
Assumes indexed documents, search queries, relevance scoring, and signals aggregations; teaches the index-time workflow explicitly.
What you can do after
Operate/configure a search pipeline that indexes per-query boost values and applies them through a dedicated boost field.
How it connects
Connects signals boosting with query-time boosting, relevance ranking, indexed payloads, and search-engine indexing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.