View Single Post
Old 01-25-2014, 02:03 PM   #624
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Hold tight....

Code:
#pgs:false
That's it. It returns all books for which #pgs has no value. If #pgs is 0, it DOES have a value, and so the book will not be returned.

If you want to find all books that either have no value for #pgs or have a value of 0 or less (maybe due to an error), use this:

Code:
(#pgs:false OR #pgs:<=0)
And yes, this works as well to find all books for which no useful page number is defined:

Code:
(NOT #pgs:>=1)
The following finds all books by Tolkien, that have no page number, or a number of 0 or lower:

Code:
(#pgs:false OR #pgs:<=0) AND (author:Tolkien)
This also works:

Code:
(NOT #pgs:>=1) AND (author:Tolkien)
===

I like to use brackets to avoid confusion about where an operand belongs.

Code:
(NOT #pgs:>=1) AND (NOT author:Salvatore)
As I don't know Calibre's precedence rules by heart (and they are sometimes different between programming languages as well), I just avoid all confusion and always use brackets. It never fails.

Last edited by Katsunami; 01-25-2014 at 02:24 PM.
Katsunami is offline   Reply With Quote