https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38694

Nick Clemens (kidclamp) <n...@bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #175459|0                           |1
        is obsolete|                            |

--- Comment #12 from Nick Clemens (kidclamp) <n...@bywatersolutions.com> ---
Created attachment 175840
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175840&action=edit
Bug 38694: Add ESBoostFieldMatch option to Elasticsearch

What this patch does is:
1 - Wraps the existing search code in a a "bool" compound query as a "must".
This should not affect
    relevancy or results of the existing searches.
2 - Before we clean/truncate terms, loop through the passed in search terms and
indexes to build a
    new 'should' query, using the 'match' on the specified index/field that is
added to the 'bool' query from above.
    This means that if a result from the original query is also returned here,
that item will be boosted in the result.
    For searches on 'keyword' or 'title', or if no index is set, we use
'title-cover' as the most narrow form of title

This query isn't going to help when users enter CCL (i.e. ti:To die for) and it
won't boost titles from 505, series, etc
when doing a general search. Nor will it have a detrimental effect, it will
only boost field matches

To test:
1 - Add a record with
    245 $a novel
2 - Add a record with
    245 $a A novel : $b about things / $c by me
3 - Search for: novel
4 - Search for: a novel
5 - Apply patch, restart all, enable ESBoostFieldMatch option
6 - Repeat searches, note exact titles are boosted
7 - Experiment with other searches, turniung pref on and off to verify relevant
titles are boosted when enabled
8 - Search results when disabled should not change

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to