Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-13-2012, 03:37 PM   #1
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,409
Karma: 4132096
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
Searching a yes/no field

I am having trouble figuring out how to do a search for a non-text field type. The text ones I can search using the tag browser, but the yes/no fields do not show up there. I want to set up some saved searches to easily find certain things and I can't do it. For instance:

- I have a field for free books which is yes/no (e.g. if the book is free, I choose yes for it). I want to know what to put in the search box so I can pull up a subset of only the free books.

- I have another field for public domain books which is yes/no (if it is a public domain title, I choose yes for it) and I want to make a saved search for these as well. What to put in the search box?

Any advice appreciated.
ficbot is offline   Reply With Quote
Old 07-13-2012, 04:17 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by ficbot View Post
I am having trouble figuring out how to do a search for a non-text field type. The text ones I can search using the tag browser, but the yes/no fields do not show up there. I want to set up some saved searches to easily find certain things and I can't do it. For instance:

- I have a field for free books which is yes/no (e.g. if the book is free, I choose yes for it). I want to know what to put in the search box so I can pull up a subset of only the free books.

- I have another field for public domain books which is yes/no (if it is a public domain title, I choose yes for it) and I want to make a saved search for these as well. What to put in the search box?

Any advice appreciated.
Code:
#customfielname:true and not #customfieldname: true
we use the Not construct because the tri-state field. False and undefined are treated as False in the search

remember the # must be included for any custom field name used in searches
theducks is online now   Reply With Quote
Advert
Old 07-13-2012, 04:34 PM   #3
ficbot
Wizard
ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.ficbot ought to be getting tired of karma fortunes by now.
 
Posts: 2,409
Karma: 4132096
Join Date: Sep 2008
Device: Kindle Paperwhite/iOS Kindle App
thank you so much, that did the trick!
ficbot is offline   Reply With Quote
Old 07-13-2012, 04:50 PM   #4
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,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
For completeness...

Taken from calibre's search documentation:
Quote:
Yes/no custom columns are searchable. Searching for false, empty, or blank will find all books with undefined values in the column. Searching for true will find all books that do not have undefined values in the column. Searching for yes or checked will find all books with Yes in the column. Searching for no or unchecked will find all books with No in the column. Note that the words yes, no, blank, empty, checked and unchecked are translated; you must use the current language’s equivalent word. The words true and false and the special values _yes and _no are not translated.
chaley is offline   Reply With Quote
Old 11-23-2015, 04:01 PM   #5
tekwrite
Enthusiast
tekwrite began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2015
Device: Kindle HDX
Search yes no field

Quote:
Originally Posted by theducks View Post
Code:
#customfielname:true and not #customfieldname: true
we use the Not construct because the tri-state field. False and undefined are treated as False in the search

remember the # must be included for any custom field name used in searches
Too BAD the docs dont seem to tell you that!! All of their examples are of non custom field searhces so how are we supposed to know about the "#" sign?
tekwrite is offline   Reply With Quote
Advert
Old 11-23-2015, 04:05 PM   #6
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by tekwrite View Post
Too BAD the docs dont seem to tell you that!! All of their examples are of non custom field searhces so how are we supposed to know about the "#" sign?
Reading something like this?

Quote:
Series indices are searchable. For the standard series, the search name is ‘series_index’. For custom series columns, use the column search name followed by _index. For example, to search the indices for a custom series column named #my_series, you would use the search name #my_series_index. Series indices are numbers, so you can use the relational operators described above.
Manual for graphical user interface.
Terisa de morgan is offline   Reply With Quote
Old 11-23-2015, 04:07 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by tekwrite View Post
Too BAD the docs dont seem to tell you that!! All of their examples are of non custom field searhces so how are we supposed to know about the "#" sign?
The really, really really subtle part right here:

Quote:
Series indices are searchable. For the standard series, the search name is ‘series_index’. For custom series columns, use the column search name followed by _index. For example, to search the indices for a custom series column named #my_series, you would use the search name #my_series_index. Series indices are numbers, so you can use the relational operators described above.
Also keep in mind that custom columns always have a "#" at the beginning of their canonical name...


EDIT: Ninjaed!

Last edited by eschwartz; 11-23-2015 at 04:12 PM. Reason: ninjaed
eschwartz is offline   Reply With Quote
Old 11-23-2015, 04:09 PM   #8
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,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by tekwrite View Post
Too BAD the docs dont seem to tell you that!! All of their examples are of non custom field searhces so how are we supposed to know about the "#" sign?
See The Search Interface, and in particular:
Quote:
Available fields for searching are: tag, title, author, publisher, series, series_index, rating, cover, comments, format, identifiers, date, pubdate, search, size and custom columns. If a device is plugged in, the ondevice field becomes available, when searching the calibre library view. To find the search name (actually called the lookup name) for a custom column, hover your mouse over the column header in the library view.
and
Quote:
For example, to search the indices for a custom series column named #my_series, you would use the search name #my_series_index.
EDIT: Oh nos, ninjaed twice!
chaley is offline   Reply With Quote
Old 11-23-2015, 04:13 PM   #9
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
It looks like all of us use the same search at google
Terisa de morgan is offline   Reply With Quote
Old 11-23-2015, 04:14 PM   #10
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,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Terisa de morgan View Post
It looks like all of us use the same search at google
Not me. I wrote that piece of the manual.
chaley is offline   Reply With Quote
Old 11-23-2015, 04:22 PM   #11
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I bow to you. Writing manuals is something I deeply dread (I'm awful at it).
Terisa de morgan is offline   Reply With Quote
Old 11-23-2015, 04:47 PM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by chaley View Post
Not me. I wrote that piece of the manual.


As a mere mortal, I must content myself with having it bookmarked and partially memorized.
eschwartz is offline   Reply With Quote
Old 11-23-2015, 04:51 PM   #13
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by eschwartz View Post


As a mere mortal, I must content myself with having it bookmarked and partially memorized.
I bow to you too. My memory nowadays is not very useful , so google is my friend.
Terisa de morgan is offline   Reply With Quote
Old 11-23-2015, 05:01 PM   #14
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
And yet you beat both of us. Somewhat ironic...
eschwartz is offline   Reply With Quote
Old 11-23-2015, 06:45 PM   #15
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: 21,624
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
It would be 'nice' if Preferences->Add your own columns displayed a table with Column heading, Lookup name (with the '#' on custom columns), Column Type, Description, Format etc.

Then there'd be no excuse for missing the need for a prepended crunch

The output of the calibredb custom_columns -d command is comprehensive, but it's not what I'd call 'user friendly' Nor is it complete in that it only 'lists' custom columns.



BR

Last edited by BetterRed; 11-23-2015 at 06:47 PM.
BetterRed is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Field of Life and Field of Mind newone Self-Promotions by Authors and Publishers 1 07-23-2012 02:21 AM
Default value for read field (Yes/No-field) opitzs Library Management 3 11-09-2011 07:17 AM
Searching OnKindle Field nynaevelan Calibre 6 10-28-2010 06:17 PM
Searching in binary field Manichean Calibre 2 06-14-2010 06:29 AM
Searching on Ratings Field nynaevelan Calibre 3 05-29-2010 05:44 PM


All times are GMT -4. The time now is 09:19 PM.


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