[Koha-bugs] [Bug 27070] Elasticsearch - with Elasticsearch 6 searches failing unless all terms are in the same field

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 24 14:51:04 CET 2020


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

--- Comment #9 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Joonas Kylmälä from comment #7)
> Any idea how well this works with weighted search fields? There was some
> discussion in
> https://discuss.elastic.co/t/cross-fields-and-boost-is-it-feasible/134219/9
> about it and also
> https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-
> multi-match-query.html#type-cross-fields mentions it but I don't see any
> immediate issues in our use case.

It seems mostly that they are saying cross_fields does more than just searching
all fields, it tries to guess which fields are most relevant to each term and
boost them - so adding field boosts on top of that kind of ruins the work.

The problem I see is that the multi field query says it should look for each
term in each field with 'OR', i.e.
(content:this OR name:this) AND (content:that OR name:that)
but what is returned actually seems to be:
(content:this AND that) AND (name:this AND that)

possibly the problem is with our 'default_operator' setting of 'AND'

I think with OR we might end up with results that don't contain all terms, but
the ones that do should be most relevant, but our field boosting may push
partial matches to the top.

cross_fields seems to at least generate the search we expect right now. I am
open to discussion, but the current state here is problematic for many users

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


More information about the Koha-bugs mailing list