[Bug 40966] New: 'whole_record' and 'weighted_fields' not passed around
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Bug ID: 40966 Summary: 'whole_record' and 'weighted_fields' not passed around Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org To reproduce: 1. Set ElasticsearchMARCFormat="Searchable array" 2. Reindex all the things: $ ktd --shell k$ koha-elasticsearch --rebuild -d -v kohadev 3. Go to advanced search, using the 'More options' option. 4. Check 'Search entire MARC record' and 'Apply weights to search' 5. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 6. Hover on any facet and look at the link => FAIL: It doesn't contain them! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 187529 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187529&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Set ElasticsearchMARCFormat="Searchable array" 2. Reindex all the things: $ ktd --shell k$ koha-elasticsearch --rebuild -d -v kohadev 3. Go to advanced search, using the 'More options' option. 4. Check 'Search entire MARC record' and 'Apply weights to search' 5. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 6. Hover on any facet and look at the link => FAIL: It doesn't contain them! 7. Apply this patch 8. Restart all k$ restart_all 9. Refresh the search results 10. Repeat 6 => SUCCESS: Links have the needed parameters! 11. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187529|0 |1 is obsolete| | --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 187531 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187531&action=edit Bug 40966: Regression tests Tests verify that whole_record and weighted_fields parameters are correctly included in the query_cgi string returned by build_query_compat(), ensuring these parameters are preserved in facet links and pagination. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: The values are not being passed around -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #3 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 187532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187532&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Apply the regression tests 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: Tests fail! These params are not passed around! 3. Set ElasticsearchMARCFormat="Searchable array" 4. Reindex all the things: k$ koha-elasticsearch --rebuild -d -v kohadev 5. Go to advanced search, using the 'More options' option. 6. Check 'Search entire MARC record' and 'Apply weights to search' 7. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 8. Hover on any facet and look at the link => FAIL: It doesn't contain them! 9. Apply this patch 10. Restart all k$ restart_all 11. Refresh the search results 12. Repeat 6 => SUCCESS: Links have the needed parameters! 13. Repeat 2 => SUCCESS: Tests pass! the parameters are passed around! 14. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40968 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40968 [Bug 40968] 'Edit this search' forgets about 'whole_records' and 'weighted_fields' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- This fixes it for the 'on' case - but if I uncheck "Apply field weights to search" - do a search, then click a facet, the weights are applied again The issue is from: my $weight_search = $params->{'advsearch'} ? $params->{'weight_search'} || 0 : 1; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187531|0 |1 is obsolete| | Attachment #187532|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 187945 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187945&action=edit Bug 40966: Regression tests Tests verify that whole_record and weighted_fields parameters are correctly included in the query_cgi string returned by build_query_compat(), ensuring these parameters are preserved in facet links and pagination. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: The values are not being passed around -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #6 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 187946 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187946&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Apply the regression tests 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: Tests fail! These params are not passed around! 3. Set ElasticsearchMARCFormat="Searchable array" 4. Reindex all the things: k$ koha-elasticsearch --rebuild -d -v kohadev 5. Go to advanced search, using the 'More options' option. 6. Check 'Search entire MARC record' and 'Apply weights to search' 7. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 8. Hover on any facet and look at the link => FAIL: It doesn't contain them! 9. Apply this patch 10. Restart all k$ restart_all 11. Refresh the search results 12. Repeat 6 => SUCCESS: Links have the needed parameters! 13. Repeat 2 => SUCCESS: Tests pass! the parameters are passed around! 14. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #7 from David Nind <david@davidnind.com> --- For step 7, I'm assuming you put 'FULL TEXT' in the first keyword field. I'm getting this for search results, instead of results and facets (normal advanced searches work fine): No results found You did not specify any search criteria. Error: Unable to perform your search. Please try again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #8 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to David Nind from comment #7)
For step 7, I'm assuming you put 'FULL TEXT' in the first keyword field.
I'm getting this for search results, instead of results and facets (normal advanced searches work fine):
No results found You did not specify any search criteria.
Error: Unable to perform your search. Please try again.
I chose phrase search instead of keyword. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #9 from David Nind <david@davidnind.com> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #8)
(In reply to David Nind from comment #7)
For step 7, I'm assuming you put 'FULL TEXT' in the first keyword field.
I'm getting this for search results, instead of results and facets (normal advanced searches work fine):
No results found You did not specify any search criteria.
Error: Unable to perform your search. Please try again.
I chose phrase search instead of keyword.
I chose 'Keyword as phrase' - without 'Search entire MARC record' I get a normal no results page, with it ticked I get the same error as above. With both patches applied, the tests now pass but I get the same error. (I'm using ktd --es7 up, as I haven't been able to get es8 to work for a while on KTD.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #10 from David Nind <david@davidnind.com> --- I had another go at testing (using ES7), but couldn't get any search results (got an error) when checking "Search entire MARC record". Testing notes, from steps 5-7: 1. Search > Advanced search 2. More options 3. Changed keyword for the first 'Search for' to 'Keyword as phrase' 4. Search term entered: agrovoc 5. Checked "Search entire MARC record" ("Apply field weights to search" was already checked") 5. I get: No results found You did not specify any search criteria. Error: Unable to perform your search. Please try again. 6. The URL includes `whole_record=on` and `weight_search=on`, but not `weighted_fields=on`. The full URL is: /cgi-bin/koha/catalogue/search.pl?advsearch=1&idx=kw%2Cphr&q=agrovoc&whole_record=on&weight_search=on&sort_by=relevance 7. Note: I do get search results when only "Apply field weights to search" s checked, with 'Subject as phrase' and 'Keyword as phrase'. I get the error if I have "Search entire MARC record" checked as well. 8. If I apply the second patch and repeat the above steps, I still get the same error as in step 5, but the URL is now: /cgi-bin/koha/catalogue/search.pl?advsearch=1&idx=kw%2Cphr&q=agrovoc&whole_record=on&weight_search_submitted=1&weight_search=on&sort_by=relevance 9. With the second patch, the tests pass. 10. All of the above was in the staff interface. For the OPAC, I don't have a "Search entire MARC record" option to check for the advanced search. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187945|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187946|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #11 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 190740 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190740&action=edit Bug 40966: Regression tests Tests verify that whole_record and weighted_fields parameters are correctly included in the query_cgi string returned by build_query_compat(), ensuring these parameters are preserved in facet links and pagination. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: The values are not being passed around -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #12 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 190741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190741&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Apply the regression tests 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: Tests fail! These params are not passed around! 3. Set ElasticsearchMARCFormat="Searchable array" 4. Reindex all the things: k$ koha-elasticsearch --rebuild -d -v kohadev 5. Go to advanced search, using the 'More options' option. 6. Check 'Search entire MARC record' and 'Apply weights to search' 7. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 8. Hover on any facet and look at the link => FAIL: It doesn't contain them! 9. Apply this patch 10. Restart all k$ restart_all 11. Refresh the search results 12. Repeat 6 => SUCCESS: Links have the needed parameters! 13. Repeat 2 => SUCCESS: Tests pass! the parameters are passed around! 14. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190741|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #13 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 190742 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190742&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Apply the regression tests 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: Tests fail! These params are not passed around! 3. Set ElasticsearchMARCFormat="Searchable array" 4. Reindex all the things: k$ koha-elasticsearch --rebuild -d -v kohadev 5. Go to advanced search, using the 'More options' option. 6. Check 'Search entire MARC record' and 'Apply weights to search' 7. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 8. Hover on any facet and look at the link => FAIL: It doesn't contain them! 9. Apply this patch 10. Restart all k$ restart_all 11. Refresh the search results 12. Repeat 6 => SUCCESS: Links have the needed parameters! 13. Repeat 2 => SUCCESS: Tests pass! the parameters are passed around! 14. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #14 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Hi, David. Thanks for taking the time! I've just started a fresh KTD like this [1]: ```shell cd ~/git/koha-testing-docker ktd --proxy --search-engine es9 up -d ``` It is using Elasticsearch 9 (tried with 8 too). With the fixed patches I submitted. things work as expected both in staff and OPAC on both ES versions. I tested searching 'agrovoc' on the 'More options' (in both interfaces) with and without 'Apply field weights...' and 'Search entire MARC...' (the latter only applies to the staff interface). Chosen options are passed around on the facets (this was working) and now also on the 'Edit this search' and 'Return to the last advanced search' respectively. Somehow a part of the dev got lost I think. I introduced 'weight_search_submitted' to keep track of the user unchecking 'weight_search' but the template was not taking it into account. Sorry for that. Probably a bad commit. [1] You don't need to use `--proxy` for it to work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #15 from David Nind <david@davidnind.com> --- Thanks Tomás for looking at this again! I'll have to leave re-tetsing until I've got a working environment with Elasticsearch ES8 or ES9 - hopefully someone who as working environment can test! Notes: - I've tried to retest, but I can't get KTD to work with either ES8 or ES9, only ES7. - I get similar errors to comment #10 step 5. - I think it is obviously something to do with my local environment (will attempt to setup KTD on my Windows desktop). - I also tried on the sandboxes (Open Fifth and BibLibre - errors when doing a full reindex after switching to Elasticserch; ByWater Solutions - "You are not from an authorized IP."). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190740|0 |1 is obsolete| | --- Comment #16 from David Nind <david@davidnind.com> --- Created attachment 190745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190745&action=edit Bug 40966: Regression tests Tests verify that whole_record and weighted_fields parameters are correctly included in the query_cgi string returned by build_query_compat(), ensuring these parameters are preserved in facet links and pagination. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: The values are not being passed around Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190742|0 |1 is obsolete| | --- Comment #17 from David Nind <david@davidnind.com> --- Created attachment 190746 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190746&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Apply the regression tests 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: Tests fail! These params are not passed around! 3. Set ElasticsearchMARCFormat="Searchable array" 4. Reindex all the things: k$ koha-elasticsearch --rebuild -d -v kohadev 5. Go to advanced search, using the 'More options' option. 6. Check 'Search entire MARC record' and 'Apply weights to search' 7. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 8. Hover on any facet and look at the link => FAIL: It doesn't contain them! 9. Apply this patch 10. Restart all k$ restart_all 11. Refresh the search results 12. Repeat 6 => SUCCESS: Links have the needed parameters! 13. Repeat 2 => SUCCESS: Tests pass! the parameters are passed around! 14. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #18 from David Nind <david@davidnind.com> --- Got ES8 and ES9 working with KTD on a Windows desktop. Things worked as per the test plan. I used 'world' for the 'Keyword as phrase' search term. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190745|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190746|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #19 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 192339 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192339&action=edit Bug 40966: Regression tests Tests verify that whole_record and weighted_fields parameters are correctly included in the query_cgi string returned by build_query_compat(), ensuring these parameters are preserved in facet links and pagination. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: The values are not being passed around Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #20 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 192340 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192340&action=edit Bug 40966: Make sure 'whole_record' and 'weighted_fields' are passed around The ES query builder correctly handles this parameters (passed from search.pl and opac-search.pl) when it builds the ES query. But the returned 'query_cgi' that is used later for keeping the search results query context for building things like facets, just doesn't pass this values around, leading to a loss of them on the generated links. This patch makes sure they are passed around. To test: 1. Apply the regression tests 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t => FAIL: Tests fail! These params are not passed around! 3. Set ElasticsearchMARCFormat="Searchable array" 4. Reindex all the things: k$ koha-elasticsearch --rebuild -d -v kohadev 5. Go to advanced search, using the 'More options' option. 6. Check 'Search entire MARC record' and 'Apply weights to search' 7. Perform a search on 'FULL TEXT' => SUCCESS: The URL contains `whole_record=on` and `weighted_fields=on` 8. Hover on any facet and look at the link => FAIL: It doesn't contain them! 9. Apply this patch 10. Restart all k$ restart_all 11. Refresh the search results 12. Repeat 6 => SUCCESS: Links have the needed parameters! 13. Repeat 2 => SUCCESS: Tests pass! the parameters are passed around! 14. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #21 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41864 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 [Bug 41864] Simple OPAC search generates warnings: Odd number of elements in anonymous hash -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 --- Comment #22 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org