Bug 30817 - Make build_authorities_query takes QueryAutoTruncate system preference into account
Summary: Make build_authorities_query takes QueryAutoTruncate system preference into a...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Alex Arnaud
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-20 08:25 UTC by Alex Arnaud
Modified: 2023-03-27 10:08 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 30817: make build_authorities_query takes QueryAutoTruncate system preference into account (2.99 KB, patch)
2022-05-20 10:00 UTC, Alex Arnaud
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Arnaud 2022-05-20 08:25:43 UTC
Currently authorities search (contains) queries are always truncated using SearchEngine::Elasticsearch::QueryBuilder::_truncate_terms.

Truncating queries could have some negative effects on search results (i.e relevance). An interesting test plan could be:

  - Enable Elasticsearch search engine,
  - make sure you have some authorities with the following heading-main content:
    "jean-Charles", "Jean", "Charles", "Jean Foo", "Foo Jean", "Jean Charles"
  - launch the following search: Main heading contains "jean-Charles" sort by "none"
  - Authority with heading-main "jean-Charles" should have the highest relevance score. But this is not the case. The score seems to be altered by the wildcard.

Patch is coming.
Comment 1 Alex Arnaud 2022-05-20 10:00:37 UTC
Created attachment 135231 [details] [review]
Bug 30817: make build_authorities_query takes QueryAutoTruncate system preference into account
Comment 2 Fridolin Somers 2022-09-06 07:32:15 UTC
Sounds logical to me.
Maybe create new options for the system preference : 
none, biblios, authorities, both.
Comment 3 Magnus Enger 2023-03-27 10:08:45 UTC
(In reply to Fridolin Somers from comment #2)
> Sounds logical to me.
> Maybe create new options for the system preference : 
> none, biblios, authorities, both.

I agree with Fridolin. You might want to have different auto truncate for biblios and auth search. So either 
- more choices, as Fridolin says, or 
- a whole new syspref, something like QueryAutoTruncateAuth