Bug 24143 - buildQuery should disable Query* on identifier search
Summary: buildQuery should disable Query* on identifier search
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Matthias Meusburger
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-02 16:06 UTC by Matthias Meusburger
Modified: 2024-05-23 12:10 UTC (History)
3 users (show)

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


Attachments
Bug 24143: Disable QueryXXX when searching on a identifier. (935 bytes, patch)
2019-12-02 16:08 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 24143: Disable QueryXXX when searching on a identifier. (1.45 KB, patch)
2020-01-13 14:13 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 24143: Disable QueryXXX when searching on a identifier. (1.46 KB, patch)
2020-01-13 16:10 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 24143: Disable QueryXXX when searching on a authority number (1.22 KB, patch)
2020-08-26 15:01 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 24143: Disable QueryXXX when searching on an authority number (1.22 KB, patch)
2020-08-26 15:01 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2019-12-02 16:06:11 UTC
Currently, QueryWeightFields, QueryFuzzy, QueryStemming, QueryAutoTruncate are disabled in buildQuery in several cases: 

 - Date of Publication
 - Date of Acquisition
 - ISBN,ISSN,Standard Number

Those modifiers should also be disabled when searching on identifiers.
Comment 1 Matthias Meusburger 2019-12-02 16:08:21 UTC
Created attachment 95927 [details] [review]
Bug 24143: Disable QueryXXX when searching on a identifier.

Using the ident or identifier-standard index should not involve
any of the following features:

 - QueryAutoTruncate
 - QueryFuzzy
 - QueryStemming
 - QueryWeightFields
Comment 2 Matthias Meusburger 2020-01-13 14:13:00 UTC
Created attachment 97311 [details] [review]
Bug 24143: Disable QueryXXX when searching on a identifier.

Using the ident or identifier-standard index should not involve
any of the following features:

 - QueryAutoTruncate
 - QueryFuzzy
 - QueryStemming
 - QueryWeightFields
Comment 3 Matthias Meusburger 2020-01-13 16:10:02 UTC
Created attachment 97323 [details] [review]
Bug 24143: Disable QueryXXX when searching on a identifier.

Using the ident or identifier-standard index should not involve
any of the following features:

 - QueryAutoTruncate
 - QueryFuzzy
 - QueryStemming
 - QueryWeightFields
Comment 4 Fridolin Somers 2020-08-26 15:01:32 UTC
Created attachment 109185 [details] [review]
Bug 24143: Disable QueryXXX when searching on a authority number

Using the ident or identifier-standard index should not involve
any of the following features:

 - QueryAutoTruncate
 - QueryFuzzy
 - QueryStemming
 - QueryWeightFields

This is used in autorities search table to display use count.
Comment 5 Fridolin Somers 2020-08-26 15:01:58 UTC
Created attachment 109186 [details] [review]
Bug 24143: Disable QueryXXX when searching on an authority number

Using the ident or identifier-standard index should not involve
any of the following features:

 - QueryAutoTruncate
 - QueryFuzzy
 - QueryStemming
 - QueryWeightFields

This is used in autorities search table to display use count.
Comment 6 Fridolin Somers 2020-08-26 15:03:15 UTC Comment hidden (obsolete)
Comment 7 David Cook 2023-06-21 01:42:00 UTC
If I recall correctly, the QueryXXX settings are set in the wrong scope in buildQuery. 

It's a long term goal to fix that one day...

At the moment, the problem with patches like this is they'll disable QueryXXX settings for unrelated indexes on complex queries. (At least if it still works the way it used to... I suppose it's always possible things have changed since I last looked.)
Comment 8 Katrin Fischer 2023-10-28 15:56:11 UTC
Is this a (partial) duplicate to bug 32707?
Comment 9 Magnus Enger 2024-02-09 14:16:28 UTC
1. There is a conflict: 

$ git bz apply 24143

Bug 24143 - buildQuery should disable Query* on identifier search

97323 - Bug 24143: Disable QueryXXX when searching on a identifier.
109186 - Bug 24143: Disable QueryXXX when searching on an authority number

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 24143: Disable QueryXXX when searching on a identifier.
Using index info to reconstruct a base tree...
M	C4/Search.pm
Falling back to patching base and 3-way merge...
Auto-merging C4/Search.pm
CONFLICT (content): Merge conflict in C4/Search.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 24143: Disable QueryXXX when searching on a identifier.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-24143-Disable-QueryXXX-when-searching-on-a-ide-M7wS8V.patch

2. I think I fixed the conflict, but testing showed no difference. Here is how I tested: 

- Find a record with an ISBN
- Add the same ISBN to another record, but change the last digit
- Search for the original ISBN and get both the original record and the record with the slightly changed ISBN as result
- Apply the patch, restart_all and reindex (should not be necessary?)
- Same result

So maybe a rebase and a test plan? :-)
Comment 10 Fridolin Somers 2024-05-23 12:10:43 UTC
Obsolete since Bug 32707 ?