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
