Summary: | Elasticsearch, SysPref FacetMaxCount don't show more than 10 facets | ||
---|---|---|---|
Product: | Koha | Reporter: | axel Amghar <axel.amghar> |
Component: | Searching - Elasticsearch | Assignee: | axel Amghar <axel.amghar> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | alex.arnaud, black23, bouzid.fergani, e.betemps, fridolin.somers, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14419 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 22903 | ||
Attachments: |
Bug 22924: Elasticsearch, show more than 10 facets
Bug 22924: Elasticsearch, show more than 10 facets Bug 22924: [alternate] Make elasticsearch honour FacetMaxCount system preference Bug 22924: Make elasticsearch honour FacetMaxCount system preference Bug 22924: Unit tests |
Description
axel Amghar
2019-05-16 11:21:02 UTC
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. |