-
Notifications
You must be signed in to change notification settings - Fork 107
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
Facets for SearchResults not being returned which is required to implement Dynamic Facets #914
Comments
This sounds interesting! If i recall, you have to add a Would all the search components have to get updated as well to allow this to be toggled on/off per component - or what were you thinking? Also, do you think we'd want to put guards in place to only allow this if the index is configured to support facets (since if you run p.facets=true and you dont have the index configured, it could run slow) |
Hi! Thanks for the quick response, apologies for the late reply.
a) On the one hand, the default faceStrategy="computed" does not use the oak index, rather it counts every time. It does try to get from a facetCache, which by default is set disabled (max.entries=0) We have to update the OOTB config to allow facet count caching. Other observations b) facetStragey="oak". This uses the index. I however was not able to get this to work. I followed the steps in docs to add facets=true to specific lucene property indexes, however no facets are returned. Have to investigate this path further. In summary, I will admit I do not have a fully fleshed out solution for all asset shares, but enabling the option for developers to call getFacets() will at least allow access to OOTB AEM behavior to explore the usage on smaller scale asset shares. Also, we would need to add these methods |
Hi folks! I am willing to contribute the solution. Kindly see below.
Is your feature request related to a problem? Please describe.
SearchResult.Facets are not accessible via in QueryBuilderResultsImpl.java, preventing implementation of Dynamic Facets.
Describe the solution you'd like
implement a small fix/update to QueryBuilderResultsImpl so that getSearchResult() is public and/or assign the facets field.
I can contribute it.
Describe alternatives you've considered
a) Copy QuerySearchProviderImpl, QueryBuilderResultsImpl and all the necessary non-exposed impl classes into my code base just so I can make this one change. In combination with updating properties.html and options.html, I now have a working dynamic facets implementation.
b) Using Solr indexing instead.
Additional context
See the behavior of my implementation. This is the end result I am looking to contribute, but we can take it step by step.
Initial State showing 2 fields
i) Type (w/o facets);
ii) Category (w/ Dynamic Facets, all facet counts)
Non-Faceted value selected, faceted values dynamically updated
Faceted value selected, faceted values dynamically updated
The text was updated successfully, but these errors were encountered: