Bug 20602

Summary: Use search fields weight/relevancy on OPAC simple search
Product: Koha Reporter: Alex Arnaud <alex.arnaud>
Component: Searching - ElasticsearchAssignee: Alex Arnaud <alex.arnaud>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: dcook, martin.renvoize, nick, nicolas.legrand, severine.queune
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 18316    
Bug Blocks:    
Attachments: Bug 20602 - use weighted fields in OPAC simple search
Bug 20602 - use weighted fields in OPAC simple search
Bug 20602 - use weighted fields in OPAC simple search
Bug 20602: Use weighted fields in OPAC simple search

Description Alex Arnaud 2018-04-18 09:58:31 UTC
Bug 18316 add the ability to configure relevancy on staff simple search. This BZ does the same for OPAC.
Comment 1 Alex Arnaud 2018-04-18 14:30:48 UTC Comment hidden (obsolete)
Comment 2 Séverine Queune 2018-04-19 19:45:54 UTC
Not sure I can test it as 18316 is 'Failed'.
Comment 3 Alex Arnaud 2018-04-23 13:35:14 UTC
Created attachment 74729 [details] [review]
Bug 20602 - use weighted fields in OPAC simple search

Test plan (having Koha working with Elasticsearch):
  - apply this patch,
  - try searches with and without weight defined on search fields

https://bugs.koha-community.org/show_bug.cgi?id=20262
Comment 4 Séverine Queune 2018-04-23 16:47:43 UTC
Created attachment 74755 [details] [review]
Bug 20602 - use weighted fields in OPAC simple search

Test plan (having Koha working with Elasticsearch):
  - apply this patch,
  - try searches with and without weight defined on search fields

https://bugs.koha-community.org/show_bug.cgi?id=20262
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 5 Séverine Queune 2018-04-23 16:50:20 UTC
Result order is now exactly the same as in the staff client.
This make the results so relevant !
Thanks Alex :)
Comment 6 Katrin Fischer 2018-08-21 22:06:03 UTC
Waiting for parent bug.
Comment 7 Martin Renvoize (ashimema) 2018-10-29 14:53:12 UTC
Created attachment 81518 [details] [review]
Bug 20602: Use weighted fields in OPAC simple search

Test plan (having Koha working with Elasticsearch):
  - apply this patch,
  - try searches with and without weight defined on search fields

https://bugs.koha-community.org/show_bug.cgi?id=20262
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2018-10-29 14:55:56 UTC
Trivial patch when applied atop bug 18316.

No regressions found.

Passing QA
Comment 9 David Cook 2018-10-30 02:22:17 UTC
I was going to say that this makes Zebra and ElasticSearch behaviours deviate, but after a glance... I think they already deviate a lot? 

Field weighting for Zebra is done really badly, so I wouldn't want it added to the Zebra simple search anyway...
Comment 10 Katrin Fischer 2018-10-30 05:51:47 UTC
I think it can't be avoided, we are not trying to rebuild Zebra as is, but something that will hopefully work better :)
Comment 11 David Cook 2018-10-30 23:17:25 UTC
(In reply to Katrin Fischer from comment #10)
> I think it can't be avoided, we are not trying to rebuild Zebra as is, but
> something that will hopefully work better :)

We can hope!
Comment 12 Nick Clemens (kidclamp) 2018-11-07 23:16:12 UTC
Awesome work all!

Pushed to master for 18.11
Comment 13 Martin Renvoize (ashimema) 2018-11-16 12:53:12 UTC
Enhancement, will not be backported to 18.05.x series.