Some combinations of QueryAutoTruncate and QueryFuzzy lead to search returning 0 results for all searches. The following combinations break search: QueryAutoTruncate - only if * is added QueryFuzzy - Try and QueryAutoTruncate - automatically. QueryFuzzy - Don't try
Adding to this, I've done some more investigating.. it seems QueryWeightFields is also relevant. Updated combinations that completely break search: QueryAutoTruncate - only if * is added QueryFuzzy - Try QueryWeightFields - Enable and QueryAutoTruncate - automatically. QueryFuzzy - Don't try QueryWeightFields - Enable I'm going to test this further and try to build a definitive list of what works and what doesn't.
Tested on recent master this combination is problematic: Make sure Koha is installed to use ICU indexing. Configuration settings: IncludeSeeFromInSearches = Don't include QueryAutoTruncate = automatically QueryFuzzy = Try QueryStemming = Try QueryWeightFields = Enable UseIcu = Using UseQueryParser = Do not try With this settings, search will work. Now switch QueryAutoTruncate = only when * is added Search won't work at all now.
*** Bug 9976 has been marked as a duplicate of this bug. ***
What about Fuzzy=Try and an older Zebra 2.0.44 (on Wheezy -- still supported)? Fuzzy adds 5=103 to the query and that results in an ERROR 120 Unsupported Truncation attribute. BTW Note that Fuzzy is enabled by default in a new Koha (sysprefs.sql). Verified on current master. Not really a welcome to Koha?
+-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+ | Setting Combination | Search Terms | Number of Results | Notes | +-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+ | QueryAutoTruncate - Automatically | frogs toads | 8 | | | QueryFuzzy - Try/Don't try | frogs and toads | 7 | The missing record here contains 'toadstools' - truncation not working correctly? | | QueryStemming - Try/Don't try | frogs or toads | 29 | 'And' and 'or' treated as search operators. | | | Adv. Search: frogs and toads | 8 | Apostrophe search not working | +-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+ | QueryAutoTruncate - only if * added | frogs toads | 7 | | | QueryFuzzy - don't try | frogs and toads | 5 | And is treated as a search word | | QueryStemming - don't try | frogs or toads | 0 | | | | Adv. Search: frogs and toads | 7 | Apostrophe search not working | +-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+ | QueryAutoTruncate - only if *added | frogs toads | 10 | Includes records with 'frog' 'toad' - querystemming working as expected? | | QueryFuzzy - don't try | frogs and toads | 6 | And is treated as a search word | | QueryStemming - Try | frogs or toads | 2 | Or is treated as a search word (Orchid, Orangutan) | | | Adv. Search: frogs and toads | 10 | Apostrophe searching works (dr spock's). Or is the s or 's just being stripped out by Query Stemming? | | | | | This seems to be the best combination - apostrophe searching and query stemming appear to be working correctly, | | | | | BUT boolean operators used incorrectly. | +-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+ | QueryAutoTruncate - only if *added | frogs toads | 0 | No results for any search | | QueryFuzzy - Try | frogs and toads | 0 | | | QueryStemming - don't try/Try | frogs or toads | 0 | | | | Adv. Search: frogs and toads | 0 | | +-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+ | | | | Queryfuzzy can't be used with ICU in use? | +-------------------------------------+--------------------------------------------------------+-------------------+------------------------------------------------------------------------------------------------------------------------+
Hi Martin, can you post your results elsewhere (wiki?), not easy to read here.
## Setting Combination QueryAutoTruncate - Automatically QueryFuzzy - Try/Don't try QueryStemming - Try/Don't try [Search Terms : Number of Results : Notes] frogs toads : 8 : frogs and toads : 7 : The missing record here contains 'toadstools' - truncation not working correctly? frogs or toads : 29 : 'And' and 'or' treated as search operators. Adv. Search: frogs and toads : 8 : Apostrophe search not working QueryAutoTruncate - only if * added QueryFuzzy - don't try QueryStemming - don't try frogs toads : 7 : frogs and toads : 5 : And is treated as a search word frogs or toads : 0 : Adv. Search: frogs and toads : 7 : Apostrophe search not working QueryAutoTruncate - only if *added QueryFuzzy - don't try QueryStemming - Try frogs toads : 0 : No results for any search frogs and toads : 0 : frogs or toads : 0 : Adv. Search: frogs and toads : 0 : QueryAutoTruncate - only if *added QueryFuzzy - Try QueryStemming - don't try/Try frogs toads : 0 : No results for any search frogs and toads : 0 : frogs or toads : 0 : Adv. Search: frogs and toads : 0 : Queryfuzzy can't be used with ICU in use?
Hi Pablo, thx for the systematic testing! (In reply to Pablo AB from comment #7) > ## Setting Combination > > QueryAutoTruncate - Automatically > QueryFuzzy - Try/Don't try > QueryStemming - Try/Don't try > > [Search Terms : Number of Results : Notes] > frogs toads : 8 : > frogs and toads : 7 : The missing record here contains 'toadstools' - > truncation not working correctly? I think this is due to it not containing frogs. The and is (as far as I know) interpreted as boolean operator. > frogs or toads : 29 : 'And' and 'or' treated as search operators. > Adv. Search: frogs and toads : 8 : Apostrophe search not working What do you mean by Apostrophe search? > QueryAutoTruncate - only if * added > QueryFuzzy - don't try > QueryStemming - don't try > > frogs toads : 7 : > frogs and toads : 5 : And is treated as a search word > frogs or toads : 0 : > Adv. Search: frogs and toads : 7 : Apostrophe search not working > > QueryAutoTruncate - only if *added > QueryFuzzy - don't try > QueryStemming - Try > > frogs toads : 0 : No results for any search > frogs and toads : 0 : > frogs or toads : 0 : > Adv. Search: frogs and toads : 0 : It's hard to tell without seeing the records what's going on there and if it's correct or not. > QueryAutoTruncate - only if *added > QueryFuzzy - Try > QueryStemming - don't try/Try > > frogs toads : 0 : No results for any search > frogs and toads : 0 : > frogs or toads : 0 : > Adv. Search: frogs and toads : 0 : > > Queryfuzzy can't be used with ICU in use? I think that is possible, we have had to play around with settings when we started using ICU in the first library. ,ext (exact field content) search is also not working with ICU as far as I know.
I just formatted Martin Renvoize's comment 5.
(In reply to Pablo AB from comment #9) > I just formatted Martin Renvoize's comment 5. Sorry Pablo, totally missed that!
We could just not use QueryFuzzy when UseICU is enabled and then add a warning to the syspref description?
I would note that QueryStemming, based on my tests on Bug 25900, is also problematic.