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 Today, 04:47 PM   #1
BetterRed
null operator (he/him)
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: 22,960
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Search finds books it shouldn't

Windows 10, Calibre 9.19

I have Preferences→Searching→Columns that non-prefixed searches are limited to: set to title, authors, tags, series, publisher. I don't have any Search groups.

When I do a simple search, e.g. 'mesopotamia', the results include books where that token appears in the Comments or other long text columns.

I don't do non-prefixed searches often enough to know whether this is a recent or ancient phenomena.

BR
BetterRed is online now   Reply With Quote
Old Today, 05:21 PM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 2,514
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
I have limit ON to: title, authors, tags, series, publisher, #tr, #ot, comments

When searching for...

mesopotamia not (title:mesopotamia or authors: mesopotamia or tags:mesopotamia or series:mesopotamia or publisher:mesopotamia or #tr:mesopotamia or #ot:mesopotamia or comments:mesopotamia)

... I got no result - which is expected FWIW.

(But I sense something not quite right for some time now about searching, on a certain library at least. In the past I used to be able to run that unprefixed search. Now when I unchecked the Limit search with this library active... got an indefinite spinning wheel)
Comfy.n is online now   Reply With Quote
Old Today, 05:28 PM   #3
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 2,514
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
(perhaps I should note that I have several search groups)
Comfy.n is online now   Reply With Quote
Old Today, 10:35 PM   #4
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: 46,637
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I cannot reproduce this. With "Limit the searched metadata" turned on and the default list of title, authors, tags, series, publisher, a search for mesopotamia only matches books that have the word in one of those columns. Books that have it only in the comments are not matched.

@BetterRed: Make sure the checkbox "Limit the searched metadata" in Preferences->Searching is actually checked. The list of columns is shown and saved whether or not it is checked, but it is ignored unless the box is checked. If it is unchecked, unprefixed searches look at all text columns, including comments, which is exactly what you are seeing. If it is checked and you still get unexpected matches, pick one of the books that should not match and look at its title, authors, tags, series and publisher. The word may be in one of those, for example in a hierarchical tag or in the publisher name. If it really is only in the comments, post back with the book details.

@Comfy.n: Your list includes comments, so matches in the comments are expected for you. Also note that this setting is global, not per library, so turning it off for one library turns it off for all of them. With it off, every unprefixed search looks through all text columns, including comments and long text custom columns. In a large library with lots of long comments that can be slow. If the search never finishes, run calibre in debug mode (Preferences->Restart in debug mode), do the search, wait a few minutes, then quit calibre and post the debug log along with roughly how many books are in the library.
kovidgoyal is online now   Reply With Quote
Old Today, 11:25 PM   #5
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 2,514
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
Yay, I found the bottleneck. It was a test column I created a while ago however forgot to delete:

Code:
python:
def evaluate(book, context):
    import zipfile, os
    try:
        epub_path = context.db.new_api.format_abspath(book.id, 'EPUB')
        if not epub_path or not os.path.exists(epub_path):
            return ''
        with zipfile.ZipFile(epub_path) as ep:
            for name in ep.namelist():
                if name.lower().endswith(('.mp3', '.m4a', '.ogg', '.flac', '.wav', '.wma', '.aac', '.opus')):
                    return '🎵'
    except Exception:
        pass
    return ''
Now I can run again unprefixed searches pretty instantly. And library switching looks faster.

Let me clarify that my unprefixed search results for mesopotamia on this large library return 39 results, whereas using the exact same fields BR mentioned on limit search preference return 7 results.

And by searching...

mesopotamia or comments:mesopotamia

...the same 39 results are returned.
Comfy.n is online now   Reply With Quote
Old Today, 11:33 PM   #6
BetterRed
null operator (he/him)
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: 22,960
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
. . .

@BetterRed: Make sure the checkbox "Limit the searched metadata" in Preferences->Searching is actually checked.
. . .
Bingo, must have pressed Alt+L,space inadvertently.

Probably when I was copying a field name to post here



BR
BetterRed is online now   Reply With Quote
Old Today, 11:34 PM   #7
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 2,514
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
(hence, comments:mesopotamia give 33 results)

welp I just noticed the math does not match. 33 + 7, so there might be another result from other column being counted on unprefixed search)

Last edited by Comfy.n; Today at 11:39 PM.
Comfy.n is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Books finds nothing in kobo store - why? Suffolk Punch Calibre 6 03-28-2024 11:48 AM
"Get Books" search finds nothing ChipAHoy Calibre 1 10-03-2016 11:37 PM
Survey finds that 62% of 16 to 24-year-olds prefer paper books to e-books K. Molen General Discussions 57 12-10-2013 04:29 AM
Teens Who Choose Music Over Books Are More Likely to Be Depressed, Study Finds kennyc News 31 04-07-2011 08:18 PM
SF/fantasy books that turned into series, and shouldn't have DMcCunney Reading Recommendations 112 12-24-2009 06:13 PM


All times are GMT -4. The time now is 11:40 PM.


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