08-11-2018, 12:19 PM | #1 |
Connoisseur
Posts: 71
Karma: 72010
Join Date: Nov 2014
Device: none
|
Search string to filter out two values
Hello having a bit of trouble with a search/filter.
I'm trying to filter out any books that contain the word 'vintage' or 'faber' in the publisher field. So far I've managed - not publisher:vintage But the following don't seem to work - not publisher:vintage or publisher:faber not publisher:vintage or not publisher:faber not publisher:vintage or faber not publisher:vintage faber Can I do what I want? Thanks |
08-11-2018, 01:29 PM | #2 |
Handy Elephant
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
|
There are two functionally identical alternatives:
not publisher:vintage and not publisher:faber not (publisher:vintage or publisher:faber) |
08-11-2018, 01:39 PM | #3 |
Connoisseur
Posts: 71
Karma: 72010
Join Date: Nov 2014
Device: none
|
Thank you. Have to admit I don't get the logical process that:
not publisher:vintage or not publisher:faber isn't actually what I'm trying to specify. |
08-11-2018, 01:48 PM | #4 |
Well trained by Cats
Posts: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Open the Tag browser: Publisher
click Publisher #1 twice (red minus will show) Hold down the control key repeat for each additional Publisher BTW at the bottom of the tag browser there is a crossed tools Icon: choose Match all |
08-11-2018, 03:25 PM | #5 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
This will always equate to true as with the ‘or’ used in this way it could only return false was if the publisher was simultaneously ‘vintage’ AND ‘Fabre’. Under any other condition at least one side of the ‘or’ would be true so the expressions as a whole would equate to true.
|
08-11-2018, 03:43 PM | #6 | |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It doesn't work because the expression you wrote will match any publisher that isn't both vintage and faber, which clearly can never happen. Why does it match? The OR operator returns TRUE if either the left or the right expression returns TRUE. The only way OR can return FALSE is if both the left and right return FALSE. Consider a book with publisher "vintage". The first expression (not publisher:vintage) returns FALSE, but the second expression (not publisher:faber) returns TRUE. FALSE or TRUE equals TRUE. The same is true for a book with publisher "faber". The first expression returns TRUE because faber is not vintage. The second expression returns FALSE because faber is faber. TRUE or FALSE returns TRUE. You are looking for books that are neither vintage nor faber. In other words you are looking for books where either (not both) the left or the right expression returns FALSE. This requires the AND operator, which returns TRUE if both the left and right expressions return TRUE, otherwise it returns FALSE. FWIW 1: this site shows the "truth tables" for boolean operators such as AND and OR. A "truth table" provides the result for all possible inputs. FWIW 2: Adoby's response makes use of something called De Morgan's laws. These "laws" provide conversions between AND and OR expressions so that the expressions provide the same answer. |
|
08-12-2018, 11:37 PM | #7 | |
Connoisseur
Posts: 71
Karma: 72010
Join Date: Nov 2014
Device: none
|
Quote:
@ducks picked up this method after rereading manual shortly before coming back here. Somehow escaped my mind to use windows ctrl function for multiple selection. Last edited by please55; 08-12-2018 at 11:45 PM. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I use a search string with CC? | peaceridge | Calibre Companion | 7 | 02-23-2015 04:25 PM |
how to search between 2 values | kindleboy | Library Management | 2 | 11-05-2013 10:01 AM |
How do I stop a string search on my Kindle 3 | niceboy | Amazon Kindle | 2 | 06-30-2011 07:38 PM |
Error when inputting a search string in V0.6.37 | solitaire | Calibre | 1 | 02-05-2010 11:29 PM |
Search for files by content string? | nekokami | iRex | 4 | 12-01-2006 12:14 PM |