Inverse Query Operators for Search Relevance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Social networking systems face inefficiencies in generating search results due to complex queries and high result volumes, leading to inadequate intersections between inner and outer query constraints, which can result in poor search relevance and processing efficiency.
Innovation Solution
The implementation of structured queries with query hinting and inverse operators allows for improved search efficiency by parsing queries to identify objects that match both inner and outer constraints, using operators like WAND and SOR, and modifying constraints to include their inverses, thereby optimizing the search process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If complex structured queries with multiple constraints are used to improve search relevance, then search result quality improves, but processing time and computational complexity increase
Solution Approach 1:
The patent segments complex structured queries into multiple vertical-specific sub-queries, where each sub-query targets a specific data vertical (e.g., photos, users, check-ins). This segmentation allows parallel processing of independent verticals and reduces the computational burden on any single query processing path, thereby maintaining search relevance while reducing overall processing time.
Solution Approach 2:
The system performs preliminary actions by pre-computing and caching intermediate results for frequently accessed verticals and constraints. Query hinting mechanisms prepare and store optimization information in advance, allowing the system to quickly retrieve and apply pre-analyzed query plans rather than重新 processing complex constraints from scratch for each search request.
2Productivity
If traditional query processing is used to maintain simplicity, then processing efficiency is maintained, but search result quality deteriorates due to inadequate constraint intersection
Solution Approach 1:
The patent introduces an intermediary query rewriting layer that translates traditional simple queries into enriched structured queries with explicit vertical constraints. This intermediary layer adds necessary constraint information without changing the user's original query interface, enabling better search result quality while maintaining processing efficiency through systematic query transformation rather than complex ad-hoc processing.
Solution Approach 2:
The system dynamically changes query parameters by adjusting the level of constraint enforcement based on vertical-specific characteristics and query hinting information. For high-priority verticals with strict constraints, the system enforces all constraints precisely, while for less critical verticals, it applies relaxed constraint satisfaction, thereby optimizing the balance between search quality and processing efficiency across different data types.
3Measurement precision
If query constraints are made more specific to improve result accuracy, then search relevance improves, but the number of matching results decreases
Solution Approach 1:
The patent implements dynamic constraint application where the strictness of query constraints is adjusted based on vertical-specific configurations and query context. For example, photo verticals may enforce strict geographic and temporal constraints, while user profile verticals may apply more flexible constraints. This dynamic approach maintains high result accuracy for critical attributes while preserving adequate result volume through adaptive constraint relaxation.
Solution Approach 2:
The system applies partial constraint enforcement by satisfying the most critical constraints fully while applying less strict enforcement to secondary constraints. Query hinting mechanisms identify which constraints are essential for result quality versus which can be relaxed to maintain result volume. This partial action approach ensures core search accuracy while preventing excessive constraint application from eliminating all matching results.
Data Source
AI summary
In one embodiment, a method includes receiving a query comprising one or more n-grams, generating a plurality of query commands based on a parsing of the query input, wherein each query command comprises a plurality of query constraints, scoring the plurality of query commands based at least in part on a number of objects matching each of the query constraints of the respective query command, selecting a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises an inverse constraint corresponding to a first query constraint that has previously been flagged as identifying greater than a threshold number of objects and one or more second query constraints, and executing the first query command to identify a plurality of objects matching the inverse constraint and the one or more second query constraints.


