- "Blue shirt of cotton make"
- "Stock that is making steady progress over the last 5 years"
- "Unexplored town in India for Christmas"
Dissecting the Query 🧐
- Are there any parts of the query that can be quantified?
- 'recommended_for' = 'christmas'
- 'expected_travel_time' = 'christmas'
- 'expected_weather' = 'cold'
- 'popularity' = 'unexplored'
- 'no_of_travellers' = 'low'
- 'no_of_travellers_on_q4' = 'low'
How to Execute this Definition? 🛠️
- How do we store the data?
- How many fields do we need to store?
- What if some fields are not available?
- You can somewhat define each search query as a structured + subjective query with an open end, but this means you'd need to change the database schema for each use case, re-index all the data, and deal with edge cases on the fly.
- Or, you can define what kind of search can be performed and build a pre-defined database that can power only that.
Can We Liberate Users? 🚀
Before jumping into it, I just wanted to share why you might be noticing this problem now. Its answer is there in this blog post.There are three major layers that power the search experience:
- Search Layer: Responsible for interpreting the user's query and retrieving relevant results from the data layer.
- Data Layer: Responsible for storing and catering retrieval requests from the search layer.
- Application Layer: Responsible for quantifying the subjective materials in each domain.