A search for “ipad” can rank accessories above iPads when accessories repeat the keyword more often. Signals boosting uses earlier users’ interactions to correct that ordering: for each query, it counts signals associated with each document and uses the counts as relevance boosts on future searches. It is a form of popularized relevance, most useful for high-volume queries that generate enough interactions to learn from. section 4.2.2 section 8.7
A basic click-based pipeline has three steps:
- Log queries and subsequent document clicks with a shared query ID. section 4.2.2
- Join click signals to their originating queries, group by query and document, and count clicks. Store the resulting query–document–boost records in a sidecar collection. section 4.2.2
- At search time, retrieve the strongest boosts for the incoming query and add document-specific boosts to the product search request. Repeating the aggregation incorporates later interactions. section 4.2.2
Listing 4.6 Creating a signals-boosting model by aggregating signals
signals_collection = engine.get_collection("signals")
create_view_from_collection(signals_collection, "signals") #1
signals_aggregation_query = """
SELECT q.target AS query, c.target AS doc, #2
COUNT(c.target) AS boost #2
FROM signals c LEFT JOIN signals q ON c.query_id = q.query_id
WHERE c.type = 'click' AND q.type = 'query'
GROUP BY q.target, doc #2
ORDER BY boost DESC"""
dataframe = spark.sql(signals_aggregation_query) #3
signals_boosting_collection = \ #4
engine.create_collection("signals_boosting") #4
signals_boosting_collection.write(dataframe) #4
The Spark SQL listing shows the central transformation: join clicks to queries, count clicks per query–document pair, and write the counts to a signals-boosting collection. section 4.2.2
When popularity helps—and when it misleads
For “ipad,” click-derived boosts move actual iPads ahead of accessories. But raw counts are not automatically trustworthy: 5,000 fabricated “star wars” searches and clicks pushed a trash can into the top result. Query normalization can combine case or spelling variations; spam protection, signal-type weights, and time decay address other sources of noise. Equal weighting may suit long-lived documents, while short-lived job postings need rapid signal processing and may be poor candidates for this approach. section 4.2.2 section 8.3.1 section 8.7 section 8.5.1
