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
EZP-26123: Map facets of all types in ResultExtractor #52
Conversation
This change allows mapping any type of facets as they come in facet_counts: "facet_queries", "facet_fields", "facet_dates", "facet_ranges" "facet_intervals" This would be implementor's responsibility to map it properly, as the data structure is different.
Hi @wodor, this looks good to me, do proceed :) How do you plan to test it, by implementing missing facet types? |
So, I have custom IntervalFacetBuilderVisitor like this https://gist.github.com/wodor/29576638a260187c678f18f5da2e11a3, but I'm not sure if it is in line with plans of development here. Beside this, I can write a unit test for the altered class. |
It would first need to be added to the https://github.com/ezsystems/ezpublish-kernel, to become part of search API. But we are quite conservative with adding new API, since all of it has to be maintained, so I don't think it will happen without going through due process. But we can definitely accept this change, there is no reason implementation should block you from implementing custom facets. Unit tests would be fine of course, though I think I would also be OK with merging this as is. |
BTW, maybe you can put your custom facets in a public repo, I'm sure people would find it useful :) |
OK, I'll try to add example implementation in a separate repo as a guideline. |
Missing issue, unit test and pointing this to 1.0 branch. But we'll see if we can handle that in a few weeks if you're not available for it, if so we'll also look into adding integration tests. |
Re integration tests, we do run them, only ones with missing implementation are skipped ( |
ok, @pspanja could you create issue for this |
This PR resolves https://jira.ez.no/browse/EZP-26123
This change allows mapping any type of facets as they come in facet_counts: "facet_queries", "facet_fields", "facet_dates", "facet_ranges" "facet_intervals"
This would be implementor's responsibility to map it properly, as the data structure is different.
For now, this is tested with visitors processing facet_fields and facet_intervals, if it gets positive feedback I can test if it's fine for other cases.