Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2022, 07:58 AM   #1
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 10,433
Karma: 3933941
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Proposed change to library search

There have been several comments about the change to searching in V5.42 where naked (unprefixed) searches now ignore punctuation, spacing, and character variants (accented characters). Before it ignored character variants only.

I am considering adding a new search prefix, Kovid suggests '^', that forces the search to respect punctuation and spacing while ignoring variants. The existing search option "Unaccented characters match accented characters and punctuation is ignored" would have no effect in this case.

Examples using two titles:
  1. "Big, Bothered, and Bad"
  2. "Big Bummer"
Using a naked search with the option checked (V5.42 behavior):
  • title:"g" matches both
  • title:"g " matches both (the search is g<space>)
  • title:"g," matches both
  • title:"gb" matches both
  • title:"g b" matches both
  • title:"db" matches #1
  • title:"," matches both (it actually matches all books)
Using the proposed prefixed search:
  • title:"^g" matches both
  • title:"^g " matches #2
  • title:"^g," matches #1
  • title:"^gb" matches nothing
  • title:"^g b" matches #2
  • title:"^db" matches nothing
  • title:"^," matches #1
To summarize the proposed behavior:
  • Naked search: either "contains ignoring punctuation and accents" or "simple contains" based on the existing preference. "Simple contains" is case insensitive matching where letter variants (e.g., accents) are significant.
  • ^ search (new): contains ignoring accents
  • = search: exact match ignoring case
  • ~ search: regex based search
I am not interested in adding options to more finely control how naked and the new prefix search behave. There are too many places where searching is used so I can't guarantee behavior. I would consider adding another prefix to force "simple contains" if there is agreement on the prefix letter, and if Kovid agrees.
chaley is offline   Reply With Quote
Old 05-14-2022, 09:15 PM   #2
ownedbycats
Wizard
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 4,166
Karma: 18002570
Join Date: Oct 2018
Location: Canada
Device: Kobo Aura HD (retired), Kobo Libra H2O
I like the idea of the prefix.

Additionally: What about adding an option to quickly toggle naked search without going through the preferences dialog? If there's not enough room for another button, it could work in the search box context menu.

Last edited by ownedbycats; 05-14-2022 at 09:18 PM.
ownedbycats is offline   Reply With Quote
Advert
Old 05-14-2022, 11:55 PM   #3
dunhill
Evangelist
dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.dunhill can program the VCR without an owner's manual.
 
dunhill's Avatar
 
Posts: 492
Karma: 196652
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by chaley View Post
There have been several comments about the change to searching in V5.42 where naked (unprefixed) searches now ignore punctuation, spacing, and character variants (accented characters). Before it ignored character variants only.

I am considering adding a new search prefix, Kovid suggests '^', that forces the search to respect punctuation and spacing while ignoring variants. The existing search option "Unaccented characters match accented characters and punctuation is ignored" would have no effect in this case.

Examples using two titles:
  1. "Big, Bothered, and Bad"
  2. "Big Bummer"
Using a naked search with the option checked (V5.42 behavior):
  • title:"g" matches both
  • title:"g " matches both (the search is g<space>)
  • title:"g," matches both
  • title:"gb" matches both
  • title:"g b" matches both
  • title:"db" matches #1
  • title:"," matches both (it actually matches all books)
Using the proposed prefixed search:
  • title:"^g" matches both
  • title:"^g " matches #2
  • title:"^g," matches #1
  • title:"^gb" matches nothing
  • title:"^g b" matches #2
  • title:"^db" matches nothing
  • title:"^," matches #1
To summarize the proposed behavior:
  • Naked search: either "contains ignoring punctuation and accents" or "simple contains" based on the existing preference. "Simple contains" is case insensitive matching where letter variants (e.g., accents) are significant.
  • ^ search (new): contains ignoring accents
  • = search: exact match ignoring case
  • ~ search: regex based search
I am not interested in adding options to more finely control how naked and the new prefix search behave. There are too many places where searching is used so I can't guarantee behavior. I would consider adding another prefix to force "simple contains" if there is agreement on the prefix letter, and if Kovid agrees.
I was just thinking that as simple searches are made, this type of proposal would appear.
Thank you very much
And I hope it is possible to add that prefix
dunhill is offline   Reply With Quote
Old 05-15-2022, 02:33 AM   #4
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 398
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Quote:
Originally Posted by chaley View Post
To summarize the proposed behavior:
  • Naked search: either "contains ignoring punctuation and accents" or "simple contains" based on the existing preference. "Simple contains" is case insensitive matching where letter variants (e.g., accents) are significant.
  • ^ search (new): contains ignoring accents
  • = search: exact match ignoring case
  • ~ search: regex based search
I agree with the proposal.
jbacelar is offline   Reply With Quote
Old 05-15-2022, 02:36 AM   #5
Katja_hbg
Zealot
Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.Katja_hbg 's ceiling is 100% spider-free.
 
Posts: 107
Karma: 118900
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
I would prefer prefix for the new 5.42 behaviour as the «old» search is more common and well kown from other software.

E.g. I expect nothing for this search. title:"gb" instead matches both
Katja_hbg is offline   Reply With Quote
Advert
Old 05-15-2022, 03:16 AM   #6
un_pogaz
Chalut o/
un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.
 
un_pogaz's Avatar
 
Posts: 271
Karma: 101903
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by Katja_hbg View Post
I would prefer prefix for the new 5.42 behaviour as the «old» search is more common and well kown from other software.

E.g. I expect nothing for this search. title:"gb" instead matches both
Agree.
  • Naked search: contains ignoring accents (if letter variants is check) pre-5.42
  • ^ search (new): contains ignoring accents and punctuation (new mode)
Seems to me much more coherent and in the continuity of the behavior of Calibre had for years.

The only reason that could make "contains ignoring punctuation and accents" (as it is in 5.42) as the default mode, and not an extension/alternative, is that the demand for this exact behavior is very strong. I ignore it, is the case?
un_pogaz is offline   Reply With Quote
Old 05-15-2022, 03:19 AM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 19,946
Karma: 97999999
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I like the prefix idea rather than adding multiple buttons in the search dialog.
DNSB is offline   Reply With Quote
Old 05-15-2022, 04:41 AM   #8
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,804
Karma: 8642135
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I like the prefix mode idea (I agree too in prefix for new behavior, not the existing one.. see Smart Eject plugin, but that is another point).
Terisa de morgan is offline   Reply With Quote
Old 05-15-2022, 04:51 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 66,044
Karma: 108832729
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
I like the idea of putting the search the way it was pre-5.4.2 and making it have to be prefixed to be the new search. That way it's very easy to just ignore the new searcg if you don't want to use it.
JSWolf is offline   Reply With Quote
Old 05-15-2022, 05:10 AM   #10
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 10,433
Karma: 3933941
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Additionally: What about adding an option to quickly toggle naked search without going through the preferences dialog? If there's not enough room for another button, it could work in the search box context menu.
This almost certainly wouldn't work as you expect. The problem: virtual libraries. VLs are implemented as a wrapper around searches, e.g., (VL_search_expression) AND (user_search_expression). Toggling the option would change *both* search expressions, probably breaking the VL. A similar thing would happen with searches that contain saved searches.

The option in Search / Preferences is best treated as set-and-forget.
chaley is offline   Reply With Quote
Old 05-15-2022, 05:14 AM   #11
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 10,433
Karma: 3933941
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@most people who replied: The consensus seems to be to put the new behavior under the new prefix and to restore the previous behavior/option for naked searches. I emailed Kovid to ask if he is OK with this. More once that discussion completes.
chaley is offline   Reply With Quote
Old 05-15-2022, 05:17 AM   #12
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 18,075
Karma: 20473921
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DNSB View Post
I like the prefix idea rather than adding multiple buttons in the search dialog.
Are you referring to the search command on the main window, or the dialogue boxes in Advanced Search tabs?
BetterRed is offline   Reply With Quote
Old 05-15-2022, 05:24 AM   #13
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 10,433
Karma: 3933941
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Kovid is unwilling to change the behavior of naked searches for reasons I agree with. I will add the prefix.
chaley is offline   Reply With Quote
Old 05-15-2022, 06:44 AM   #14
ownedbycats
Wizard
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 4,166
Karma: 18002570
Join Date: Oct 2018
Location: Canada
Device: Kobo Aura HD (retired), Kobo Libra H2O
Will the prefix also apply to searching for accented characters?
ownedbycats is offline   Reply With Quote
Old 05-15-2022, 06:48 AM   #15
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 10,433
Karma: 3933941
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Will the prefix also apply to searching for accented characters?
The prefix means
  • character variants always match e.g., 'e' matches 'é', 'è', 'ê', and 'ë'
  • spaces and punctuation are always significant.

Last edited by chaley; 05-15-2022 at 07:03 AM.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amazon Search Change? dandelioncottage Amazon Kindle 4 09-04-2021 06:01 PM
Change Search Prefs stevejoung Kindle Developer's Corner 12 10-10-2014 07:30 AM
Change in Search Result? geormes Calibre 2 04-05-2014 07:08 PM
New York Times Proposed Recipe Change bcollier Recipes 8 04-06-2011 09:28 AM
Change in Search Features? polly Calibre 5 04-24-2010 07:36 PM


All times are GMT -4. The time now is 05:07 AM.


MobileRead.com is a privately owned, operated and funded community.