-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit faceting to top N hits #2040
Comments
+1, I also need this feature Can anyone point me to the class(es) or way to implement this? Thx |
+1 This feature would be really useful to me. |
+1 |
This would be very useful! |
+1, Save top k is enough |
I have done some work on this since I need it for a project. I only implemented it for terms facets at the moment until I get some feedback on implementation. Can someone take a look at the diff of my fork and let me know if this is on the right track? https://github.com/fmaritato/elasticsearch/compare/issue2040 Essentially, I added a "num_results" parameter to the terms facet. The unit test I added uses the elasticsearch-test framework since it is easier and faster than the integration tests the project currently uses. I can take it out or switch it over if desired. Thanks |
+1 |
Closing in favour of #6876 |
Actually, #6876 doesn't solve this. Please could I have some info about use cases here. Why do you need this feature? |
The project I was working on was indexing shopping products from different providers who had inventory. I found when I was doing searches but only returning the first 25 items that the facets returning the brand names and counts reflected the entire search instead of what was being shown on the page. This often lead to a confusing user experience. |
I can see the usefulness of this option. |
Related: I extended the significant_terms agg in #6796 to add sampling of top results from each shard. For that use case it was also beneficial to eliminate near-duplicates from the analysis because they tend to rank similarly in the results. Using elements of this implementation and the new "deferred" capability in the aggregations base class we could add a sampling capability that would apply to all child aggregations in a tree. |
Closed in favour of #8108 which is now in master branch |
See
https://groups.google.com/d/msg/elasticsearch/OZsc5ofNhag/9JfwSy-CEMwJ where Shay says "...with the design of the facets, if shouldn't be hard to implement..."
The text was updated successfully, but these errors were encountered: