Netflix's Graph Search, previously known as Studio Search, has expanded beyond Content Engineering to the entire Engineering organization. It supports over 100 applications and 50 indices. To address the challenge of knowing who to notify when a movie's status changes, Graph Search implemented reverse search using Elasticsearch's percolator fields.
Reverse search enables the creation of "SavedSearches" that filter on an existing index. These filters are translated into Elasticsearch queries and indexed in a percolator field. When a document is submitted, it is matched against the saved queries, identifying the ones that return it.
This functionality allows for precise notifications based on change events, reducing the impact on the federated graph. To support reverse search, Graph Search's indexing pipeline has been modified to include a separate pipeline for indexing saved searches, with mappings aligned using index templates.
The percolate indexing pipeline utilizes Data Mesh CDC events and a Graph Search DGS mutation to translate and index saved searches. Versioning is handled by creating new index versions and pipelines, allowing for mapping changes without interrupting existing pipelines.
Reverse search is not only useful for notifications but also for creating dynamic criteria matchers. The Movie Matching service uses reverse searches to classify movies based on matching criteria. This pattern can be extended to any Graph Search index.
Furthermore, reverse search lays the groundwork for more responsive UIs, enabling subscriptions that update results based on index changes, matching saved queries.
netflixtechblog.com
netflixtechblog.com
Create attached notes ...
