Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2022, 03:01 PM   #1
ienosos
Member
ienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enough
 
Posts: 24
Karma: 568
Join Date: Feb 2018
Location: USA
Device: Android phone, Android tablet
Search doesn't return matching entries if they start with not

This is a weird little issue I found today when I was trying to search for a book title that had "not" as the first word in the title.

I didn't use a metadata prefix ( title: ) in the search so it applies specifically to a plain search.

I searched on the term Not Quite According to Plan and even though that was the exact title of the book in my library, it didn't come up in the results.

I knew that couldn't be right, so I messed around and figured out that this only seems to be happening when the first word in the search is "not" and it's not inside quotes (which I don't do when I'm just trying to quickly search for something, of course, because maybe I'm not sure it's the exact title).

I have several stories in my library that start with not so I was able to test it for a variety of books.

So, heads up, if you're searching for a book that starts with not, be sure to use a metadata prefix in your search or you might not get all the results. Not sure if this is intentional behavior or just an artifact of the code or whatever. Or maybe it's a known issue and I just didn't know about it.
ienosos is offline   Reply With Quote
Old 04-05-2022, 03:11 PM   #2
ownedbycats
Custom User Title
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: 10,947
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I believe it's intended behavior; I had similar issues when trying to find a book with "false" in the title.
ownedbycats is offline   Reply With Quote
Advert
Old 04-05-2022, 03:33 PM   #3
chaley
Grand Sorcerer
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.
 
Posts: 12,436
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
If I understand you correctly you are talking about searching for a book with the title "Not What I Wanted" by typing those words in the search box. As in
Click image for larger version

Name:	Clipboard01.jpg
Views:	105
Size:	9.7 KB
ID:	193109

The behavior you describe is expected and correct. Similar things will happen if *any* word in the string is NOT, AND, or OR. That sequence of words above means
Code:
NOT
     What
AND
     I
AND
    Wanted
Said another way, it is "(not What) and (I and Wanted)".

If you typed in "Live or Let Die" (without the quotes) what you typed is interpreted as
Code:
    Live
OR
(
        Let
    AND
        Die
)
There is no other way to interpret bare keywords other than as keywords as long as calibre supports AND, OR, and NOT operators.
chaley is offline   Reply With Quote
Old 04-05-2022, 03:47 PM   #4
ienosos
Member
ienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enough
 
Posts: 24
Karma: 568
Join Date: Feb 2018
Location: USA
Device: Android phone, Android tablet
Quote:
Originally Posted by chaley View Post
If I understand you correctly you are talking about searching for a book with the title "Not What I Wanted" by typing those words in the search box. As in
Attachment 193109

The behavior you describe is expected and correct. Similar things will happen if *any* word in the string is NOT, AND, or OR.

Gotcha! Totally makes sense. I hadn't realized the basic search supported those. I just made the assumption that spaces were probably equivalent to AND.

It also explains the weird assortment of books that were the results of that search.

Last edited by ienosos; 04-05-2022 at 03:50 PM.
ienosos is offline   Reply With Quote
Old 04-05-2022, 03:52 PM   #5
ienosos
Member
ienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enoughienosos will become famous soon enough
 
Posts: 24
Karma: 568
Join Date: Feb 2018
Location: USA
Device: Android phone, Android tablet
Quote:
Originally Posted by ownedbycats View Post
~ worked on "not" too, I just gave it at try. Got the exact search result I expected when I searched for ~Not Quite According to Plan. Thanks.
ienosos is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template Search: Exact matching ownedbycats Library Management 3 04-03-2022 05:01 PM
Is there a way to make the entries in the search fields appear larger? PatNY Sigil 46 01-21-2018 03:18 PM
Regex Search doesn't search all files in Edit Book GregTheGrate Editor 8 11-08-2016 12:47 AM
Help needed - how to search for library entries with multiple formats jecilop Calibre 2 09-19-2015 01:39 AM
Search filters: accented characters not matching plain ones riki Calibre 4 11-26-2011 07:38 AM


All times are GMT -4. The time now is 07:44 PM.


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