|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Full-text search can't handle single-quote mark in a phrase (e.g. golfer's elbow)
why can't calibre full-text search for "golfer's elbow" (quotes in search)? I have books with that phrase. Does Calibre full-text search have a hard time with single quote marks in the search?
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,519
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
full text search is based on words, it doesnt support punctuation of any kind, and that limitataion comes from the sqlite fts engine.
|
![]() |
![]() |
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
hi kovid,
thanks for your reply. so how do you propose full-text-searching for the phrase [golfer's elbow] ? |
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47,493
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Why not enclose the search in "s ( i.e. "golfer's elbow" ). That works for me when searching for year's best for example. See attached image.
|
![]() |
![]() |
![]() |
#5 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Quote:
Actually, I learned that full-text search, at least in phrases, does support punctuation. But I'm getting ahead of myself. Let's rewind. FT Search couldn't find any books with "golfer's elbow" But it found eight books when it was a curly (a.k.a "smart) apostrophe, as in: "golfer’s elbow" |
|
![]() |
![]() |
![]() |
#6 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
|
![]() |
![]() |
![]() |
#7 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 47,493
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
OTOH, I learned some new words from him while he was working on that project. |
|
![]() |
![]() |
![]() |
#8 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,519
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
No, Kovid, I did not turn it on. Please refer to screenshot of the FTS window
|
![]() |
![]() |
![]() |
#10 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,673
Karma: 7908443
Join Date: Sep 2020
Device: none
|
Quote:
For what it's worth, I see a different number of results when full-text searching with each apostrophe's variant: Could it be the case that you only have books containing results with the smart apostrophe? Given the sqlite FTS limitation, I often find myself using the Quality Check Plugin Search ePubs tool, as it can run regex searches. For instance: (?i)\, though\. gives me results containing the segment ", though." Sqlite FTS can't do that, unfortunately. |
|
![]() |
![]() |
![]() |
#11 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Quote:
Thank you for sharing your thoughts. It seems that Calibre's full-text search is particular when it comes to apostrophes. We must do both smart/curly quotes and "dumb" quotes to get all search hits. |
|
![]() |
![]() |
![]() |
#12 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,673
Karma: 7908443
Join Date: Sep 2020
Device: none
|
Quote:
golfer’s elbow OR golfer's elbow maybe: golfer['’]s elbow |
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,519
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#14 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,633
Karma: 108669873
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
' -> ‘ or ’ and is sometimes wrong, messing up ’tis or ’90s " -> “ or ” << ->« >> -> » It’s using very simple context and lookup table. ' Typewriter single quote. Something like it can be used in transliterated words or dictionaries. Otherwise only for strings in programming. ‘ open quote ’ close quote or apostrophe ′ single prime (feet, minutes) " Typewriter double quote. Only for Strings in programming. “ Open double quote ” Close double quote (these will be different in German etc) ″ double prime (inches, seconds) The ` left of 1 is not a quote, it's diacritic and your keyboard map should have it as dead for à è ì ò ù ỳ Unfortunately people creating or editing metadata can mess up. Typewriters omitted ‘ ’ “ ” { } [ ] 1 0 (used I and O) and often ! and currency symbols using l backspace . and S, L, Y etc with l, -, = etc. Last edited by Quoth; 10-29-2023 at 09:38 AM. Reason: Clearer in Georgia font |
|
![]() |
![]() |
![]() |
#15 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,673
Karma: 7908443
Join Date: Sep 2020
Device: none
|
Out of curiosity, I tested it this way:
FTS for "year's best" (typewriter's single quote), marked all books, tagged them with year['’]s best FTS for "year’s best" (apostrophe), marked all books, tagged them with year['’]s best Then I selected all tagged books and ran these queries with the Search Epubs tool: year[']s best returned 10 results year[’]s best returned 68 results Final step: check if searching for year['’]s best would return the same number, and it found exactly 78 results. I was under the impression that some books were using both forms in the same edition |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre freeze when I use full search text with quote | ronnydaca | Calibre | 1 | 03-18-2023 04:19 PM |
Full-text search not really full-text | secasa | Library Management | 5 | 10-01-2022 10:11 PM |
Single-quote/Double-quote | Rand Brittain | ePub | 9 | 09-01-2011 11:34 AM |
HTML2ePub conversion (question mark instead single quote) | mikij | Calibre | 5 | 08-07-2010 02:15 AM |
Google Book Search to search full-text books online | Bob Russell | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 08-19-2006 12:13 PM |