Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-04-2020, 03:12 PM   #1
Terry Brown
Enthusiast
Terry Brown began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jun 2010
Location: Portland, OR
Device: M1 Max Mac Studio, iPad Pro 2018 12.9, iPhone 7
calibredb inconsistent title: search results

MobileRead Forums post re: calibredb

I am using calibredb from Terminal (and a Python script) in macOS 10.15.4 to retrieve and set various metadata items in my Calibre Library. My problem is that searches of the library using title:”book title” behave unexpectedly.

For example, the following command:

calibredb list -s title:"To Be a Machine" -f title,authors

Results in:

id title authors
96 How to Live Safely in a Science Fictional Universe: A Novel Charles Yu
797 One Giant Leap: The Impossible Mission That Flew Us to the Charles Fishman
Moon
860 Rogue Protocol: The Murderbot Diaries Martha Wells
866 To Be a Machine Mark O'Connell

Why? There is only one title that exactly matches. BookID 96 only matches “to” and “a”; BookID 797 matches “to” only, and BookID 860 doesn’t match anything that I can see.

If I use Calibre GUI’s search box with title:”To Be a Machine”, it only returns the O’Connell book, which is what I expect.

Another example:

calibredb list -s title:"Tool of War" -f title,authors

Gives:

id title authors
607 Tool of War Paolo Bacigalupi

Perfect, but this is inconsistent with the previous example. For instance, doing:

calibredb list -s title:”of war" -f title,authors

Shows:

id title authors
44 The Bully Pulpit: Theodore Roosevelt, William Howard Taft, and the Golden Age of Goodwin, Doris Kearns
Journalism
68 The Rapture of the Nerds: A Tale of the Singularity, Posthumanity, and Awkward Cory Doctorow & Charles Stross
Social Situations
116 No Less Than Victory: A Novel of World War II Jeff Shaara
142 War of the Whales: A True Story Joshua Horwitz
228 Recollections Of War Terrence L. Brown
287 Flossie's War Terrence L. Brown
355 War Dogs: Ares Rising Greg Bear
550 The Awkward Age Francesca Segal
607 Tool of War Paolo Bacigalupi
633 Warlight Michael Ondaatje
649 Embers of War Gareth L. Powell
762 Dogs of War Adrian Tchaikovsky

In this case the first two are there apparently because the three letter sequence “war” is present within words of the title rather than as whole words. If I do the same search using Calibre GUI search, it only finds book titles that contain the exact phrase “of war”, so it doesn’t find “War of the Whales” for example.

Is there some additional information I need to give calibredb?
Terry Brown is offline   Reply With Quote
Old 05-04-2020, 10:14 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,984
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
-s 'title:"whatever"'
kovidgoyal is offline   Reply With Quote
Advert
Old 05-05-2020, 11:29 AM   #3
Terry Brown
Enthusiast
Terry Brown began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Jun 2010
Location: Portland, OR
Device: M1 Max Mac Studio, iPad Pro 2018 12.9, iPhone 7
Brilliant! Works perfectly, thank you.
Terry Brown is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibredb search iomari Calibre 4 04-16-2019 11:58 AM
Add Series to Title in CalibreDB? phossler Calibre 4 01-27-2015 09:19 AM
search results and MR taming Feedback 4 09-13-2013 12:40 PM
Get Books search - extremely fuzzy search results? Man Eating Duck Calibre 1 05-06-2013 12:08 AM
calibredb add --title= not working krischik Library Management 2 04-06-2012 02:57 AM


All times are GMT -4. The time now is 03:46 AM.


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