I have around 300k docs and I want to run a query aggregation with diff stages.
the query needs 2 to 5s to resolve, depend on the text query, let say if we do “iphone 10” the query will take 1s but if we do “iphone 11 glass screen protectors” will take 3 to 10s, is there any way to improve this pipeline :
Hi Elle_Shwer thank you for the response, I want to create an aggregation pipeline, but I dont know what’s the best practice specially I need a complex query, first we need to search by the title then we need to sort the data by price then limit to 20.
the result should return the docs + the availble categories in these docs + the count of each.
docs suggest to use near instead of sort but I have no Idea how to use it with text/phrase operator.
and how to use facets in my case.