Hold tight....
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:
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.