Bug 22413 - Elasticsearch - Search settings are lost after sorting, faceting or paging
Summary: Elasticsearch - Search settings are lost after sorting, faceting or paging
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Ere Maijala
QA Contact: Martin Renvoize
URL:
Keywords:
: 18319 20114 22412 (view as bug list)
Depends on:
Blocks: 22592 22412
  Show dependency treegraph
 
Reported: 2019-02-25 19:22 UTC by Marjorie Barry-Vila
Modified: 2019-10-01 14:52 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 22413: Improve query string and desc creation for Elasticsearch (4.52 KB, patch)
2019-03-05 09:06 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22413: Improve query string and desc creation for Elasticsearch (4.59 KB, patch)
2019-03-05 11:59 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22413: Improve query string and desc creation for Elasticsearch (4.63 KB, patch)
2019-03-26 15:40 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 22413: Improve query string and desc creation for Elasticsearch (5.23 KB, patch)
2019-04-25 08:47 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22413: Improve query string and desc creation for Elasticsearch (5.29 KB, patch)
2019-04-25 09:22 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marjorie Barry-Vila 2019-02-25 19:22:32 UTC
Hi,
There is a problem when sorting a list of results, a new search is done and index title for example is lost.

Test plan:
- Do a search with index title (koha/opac-search.pl?idx=ti&q=quebec)
- Sort by title A-Z
- a new search is done and index "ti" is lost (opac-search.pl?q=quebec&sort_by=title_az)



Regards
Marjorie
Comment 1 Katrin Fischer 2019-02-25 19:29:43 UTC
Hi Marjorie, thx for reporting! By default new bugs get 'enhancement' - please feel free to change that setting for bugs!
Comment 2 Marjorie Barry-Vila 2019-02-27 16:44:59 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Marjorie, thx for reporting! By default new bugs get 'enhancement' -
> please feel free to change that setting for bugs!

Ok thanks!
Marjorie
Comment 3 Ere Maijala 2019-03-05 09:06:43 UTC
Created attachment 86049 [details] [review]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet
Comment 4 Josef Moravec 2019-03-05 11:59:32 UTC
Created attachment 86059 [details] [review]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Ere Maijala 2019-03-08 11:05:16 UTC
*** Bug 18319 has been marked as a duplicate of this bug. ***
Comment 6 sandboxes@biblibre.com 2019-03-26 15:40:11 UTC
Patch tested with a sandbox, by Marjorie <marjorie.barry-vila@collecto.ca>
Comment 7 sandboxes@biblibre.com 2019-03-26 15:40:34 UTC
Created attachment 87026 [details] [review]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Comment 8 Martin Renvoize 2019-04-25 08:10:06 UTC
Sorry Ere, I had a quick go at re-basing this but I wasn't entirely confident I was getting it right. Setting to Does Not Apply, once rebased please set back to SO and I'll get back to QAing it.
Comment 9 Ere Maijala 2019-04-25 08:47:09 UTC
Created attachment 88716 [details] [review]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Comment 10 Ere Maijala 2019-04-25 08:48:39 UTC
Rebased. I also sneaked in a tweak to exclude any limits from the displayed query since they're displayed separately.
Comment 11 Martin Renvoize 2019-04-25 09:22:03 UTC
Created attachment 88733 [details] [review]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2019-04-25 09:22:42 UTC
Awesome, works well and no regressions found.

Passing QA
Comment 13 Nick Clemens 2019-04-25 11:56:19 UTC
Awesome work all!

Pushed to master for 19.05
Comment 14 Martin Renvoize 2019-04-26 15:24:37 UTC
Pushed to 18.11.x for 18.11.05
Comment 15 Nick Clemens 2019-06-10 14:52:38 UTC
*** Bug 20114 has been marked as a duplicate of this bug. ***
Comment 16 Nick Clemens 2019-10-01 14:52:26 UTC
*** Bug 22412 has been marked as a duplicate of this bug. ***