A search feature is a numerical attribute of a query, a document, or the relationship between them. It gives a ranking function a piece of evidence to score. For a movie search, a title-match score, an overview-match score, and a release year can each be separate features. A feature may also encode domain-specific evidence, such as commute distance in a job search, if it can be computed quickly enough when the user searches. section 10.3
Features can enter a search pipeline in several ways:
- In a manually configured ranking function, scoring functions combine signals such as keyword similarity, distance, freshness, popularity, field matches, and phrase matches. Their contributions can be weighted to suit the domain. section 3.2.2 section 3.3
- For learning to rank, feature logging computes values for labeled query–document pairs. A model learns how to combine those values, then commonly reranks a smaller set of candidates retrieved by a faster function such as BM25. section 10.3 section 4.2.4
- After deployment, inspect failures and training-data coverage before adding features. A feature cannot teach a model much about cases absent from its judgments; relevance gains must also be checked against search-speed costs. section 10.7 section 10.8
Logging evidence for a movie query
For the query “social network,” log each judged movie’s title-match score, overview-match score, and release year alongside its relevance grade. A relevant movie has a title score of 8.243603; one irrelevant movie scores 0 on title but 6.0172443 on overview. Those observations suggest testing a greater weight for title match—not assuming that every overview match is irrelevant. section 10.3
Table 10.2 Features logged for the keywords social network for relevant (grade=1) and irrelevant (grade=0) documents
|
Grade
|
Movie
|
title:({keywords})
|
overview: ({keywords})
|
{!func}release_year
|
|---|---|---|---|---|
|
1
|
Social Network
|
8.243603
|
3.8143613
|
2010.0
|
|
0
|
#chicagoGirl
|
0.0
|
6.0172443
|
2013.0
|
|
0
|
Life As We Know It
|
0.0
|
4.353118
|
2010.0
|
|
0
|
The Cheyenne Social Club
|
3.4286604
|
3.1086721
|
1970.0
|
The logged-feature table shows how one query becomes rows of relevance grades and numerical inputs for ranking. section 10.3
Features can reveal blind spots as well as improve scores. In a product-search example, logged results all had a name match and none had a promotion flag. Exploring products outside that pattern produced new judgments; adding a promotion feature improved offline results and the reported A/B test. That result depends on the newly observed user behavior, not on promotion being universally useful. section 12.3.1 section 12.3.3













