[Koha-bugs] [Bug 25273] Elasticsearch Authority matching is returning too many results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 5 16:58:39 CEST 2020


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

--- Comment #11 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Julian Maurice from comment #10)
> Hi Nick,
> 
> (In reply to Nick Clemens from comment #9)
> > This may work in this simpler case, however, specifying the fields generates
> > them in a fixed order, and authorities order can differ and has different
> > meanings
> 
> Can you provide a test plan with a complex case, which cannot be solved
> using configuration only ?

I don't have a specific example of an authority that doesn't work, but if we
look at the example Alex provides:

Before the patches, with mapping 150(abgvxyz) the two records are indexed with
match-heading as:
['Waterworks']
['Waterworks Costs','Waterworks generalsubdiv Costs']

After the patch:
['Waterworks']
['Waterworks generalsubdiv Costs']

In both cases when linking we perform a search for:
'Waterworks generalsubdiv Costs'

The matching works before only because we are already generating the heading
search form and storing it in the index, the mappings don't affect the terms
used for matching.

Custom added authority types still use the hard coded hashes in
C4/Heading/{marcflavour} to generate the heading search form, so will only work
if they use a field defined there with or without the patches

Adding the user defined fields only adds the possibility for mismatches, it
doesn't add functionality. There are subdivisions that can be reordered (which
mappings don't handle) and terms like '$aScience$vFiction' and '$aScience
fiction' which can end up mismatching

Since we are always using the standardized C4::Heading->search_form when
performing the search we should also only store that search_form in the index

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list