When you use the SysPref FacetMaxCount with a value higher than 10 , we see more than 10 facets in refine your search, but with elastic we don't see more than 10 facets, Examples: with zebra: https://snag.gy/RY5cwP.jpg with elastic: https://snag.gy/v8bnBD.jpg
Created attachment 89852 [details] [review] Bug 22924: Elasticsearch, show more than 10 facets To test: Without the patch: - check if you have your SysPref SearchEngine with Elasticsearch as value, - put your SysPref FacetMaxCount at 15, - make the search "a" in the catalog, - in Refine your search click on show more for authors, - make sure there is no more than 10 facets dislpaying With the patch: - apply the patch, - make the same, - make sure there is exactly 15 facets for authors.
More a bug than enhancement
Created attachment 90053 [details] [review] Bug 22924: Elasticsearch, show more than 10 facets To test: Without the patch: - check if you have your SysPref SearchEngine with Elasticsearch as value, - put your SysPref FacetMaxCount at 15, - make the search "a" in the catalog, - in Refine your search click on show more for authors, - make sure there is no more than 10 facets dislpaying With the patch: - apply the patch, - make the same, - make sure there is exactly 15 facets for authors. Signed-off-by: Michal Denar <black23@gmail.com>
Hi, I have problem when applying this patch. Without the patch, when i search "a", i have results but with this patch nothing. Thanks.
Hi, in kohadevbox? Did you aplly restart_all after patch?
Created attachment 90341 [details] [review] Bug 22924: [alternate] Make elasticsearch honour FacetMaxCount system preference We have a line in QueryBuilder to respect the preference if a facet is expanded, it seems we forgot to pass the option to the querybuilder however To test: 1 - Enable Elasticsearch 2 - Set FacetMaxCount to 20 3 - Search in ES for '*' or something with a lot of results 4 - Expand some facets, note you get no more than 10 for any facet 5 - Apply patch 6 - Search again 7 - Expand facets, note they now go up to 20 8 - Try with various values of FacetMaxCount
I propose an alternate patch - QueryBuilder should already respect the preference, as long as we pass an expanded facet It should have unit tests regardless of which patch we use
Created attachment 90665 [details] [review] Bug 22924: Make elasticsearch honour FacetMaxCount system preference We have a line in QueryBuilder to respect the preference if a facet is expanded, it seems we forgot to pass the option to the querybuilder however To test: 1 - Enable Elasticsearch 2 - Set FacetMaxCount to 20 3 - Search in ES for '*' or something with a lot of results 4 - Expand some facets, note you get no more than 10 for any facet 5 - Apply patch 6 - Search again 7 - Expand facets, note they now go up to 20 8 - Try with various values of FacetMaxCount Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 90903 [details] [review] Bug 22924: Unit tests
HI, The patch of tests is not apply correctly. Bug 22924 - Elasticsearch, SysPref FacetMaxCount don't show more than 10 facets 90665 - Bug 22924: Make elasticsearch honour FacetMaxCount system preference 90903 - Bug 22924: Unit tests Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 22924: Make elasticsearch honour FacetMaxCount system preference Applying: Bug 22924: Unit tests Using index info to reconstruct a base tree... M t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t CONFLICT (content): Merge conflict in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t error: Failed to merge in the changes. Patch failed at 0001 Bug 22924: Unit tests The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-22924-Unit-tests-N6uhfY.patch Bouzid
Can anybody rebase on master? Thank you.
Bug 14419 adds the size parameter to all facets. Expanded facet is removed so this one is no longer needed *** This bug has been marked as a duplicate of bug 14419 ***