Show only results that are relevent to my shopping history

I want to understand if elasticsearch + knn could be used to accomplish this ask: a search on an item should only show relevent results with my shopping history.

eg) search on dress should only show red or black or full sleeve (as my shopping history could be filled with items in this category)

Hello @searchwithme,

If I understood correctly, you would like to perform a KNN search but limit the search to documents that have a specific value for the "category" field. In this example, the "category" field represents the shopping history category. You want to retrieve the top k documents that match this specific category value. If that's the case, you can achieve this by performing a filtered KNN search.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.