Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-25-2022, 12:08 AM   #1
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Custom Column Filter - Unexpected behaviour

Hi all,

I'm getting unexpected behaviour from this search using the Goodreads Plugin:

When using #r (my lookup name for the custom column containing the grrating identifier), #r:false returns 0 titles; whereas using identifiers:grrating:false the search returns the correct number of titles in the library that still don't have the grrating.

OTOH, both identifiers:grrating:true and #r:true queries return the titles that already have the grrating, as expected.

(i've tried renaming the custom column from #r to #gr, restarting Calibre, but that didn't help: searching for #gr:false returns an empty list)

Last edited by Comfy.n; 09-27-2022 at 12:04 AM.
Comfy.n is offline   Reply With Quote
Old 09-25-2022, 04:09 AM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
as a workaround I'm using

Code:
not #r:true
Comfy.n is offline   Reply With Quote
Advert
Old 09-25-2022, 05:16 AM   #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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Hi all,

I'm getting unexpected behaviour from this search using the Goodreads Plugin:

When using #r (my lookup name for the custom column containing the grrating identifier), #r:false returns 0 titles; when using identifiers:grrating:false the search returns the correct number of titles in the library that still don't have the grrating.

OTOH, both identifiers:grrating:true and #r:true queries return the titles that already have the grrating, as expected.

(i've tried renaming the custom column from #r to #gr, restarting Calibre, but that didn't help: searching for #gr:false returns a empty list)
What is the column type of #r? If it is a composite column (built from ...) then what is the template?

My guess is that the problem is related to confusion about what ':true' and ':false' mean in calibre searches. ':true' finds books with any value in the column and ':false' finds finds books with no value. For composites, empty is considered to be no value. For bool and bool-like columns, :false finds books with no value in the column, not columns containing 'No'.
chaley is offline   Reply With Quote
Old 09-25-2022, 05:25 AM   #4
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,729
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by chaley View Post
What is the column type of #r? If it is a composite column (built from ...) then what is the template?.
Assuming comfy.n followed the readme instructions, it would indeed by a 'Column built from other columns' and the template will be:

{identifiers:select(grrating)}
kiwidude is offline   Reply With Quote
Old 09-25-2022, 05:30 AM   #5
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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
Assuming comfy.n followed the readme instructions, it would indeed by a 'Column built from other columns' and the template will be:

{identifiers:select(grrating)}
In which case I am confused. The column will be empty if there is no identifier 'grrating'. #r:false will find those columns.

Also, the search "not #r:true" is exactly equivalent to the search "#r:false". If that isn't true then something is broken and I would really like to see the underlying data.
chaley is offline   Reply With Quote
Advert
Old 09-25-2022, 05:34 AM   #6
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by kiwidude View Post

{identifiers:select(grrating)}
I'm using that

edit: attached screenshots to illustrate
Attached Thumbnails
Click image for larger version

Name:	MWSnap0649 2022-09-25, 06_45_56.png
Views:	83
Size:	6.1 KB
ID:	196764   Click image for larger version

Name:	MWSnap0648 2022-09-25, 06_45_28.png
Views:	83
Size:	11.1 KB
ID:	196765  

Last edited by Comfy.n; 09-25-2022 at 05:48 AM. Reason: attached screenshots
Comfy.n is offline   Reply With Quote
Old 09-25-2022, 05:45 AM   #7
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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
I'm using that
Then as I said above, I am confused. What you describe should not be possible. And I can't make it fail.

Are you willing to share your metadata.db with me so I can debug this? If so, zip it up and send it to "calibre-bugs at charleshaley dot org" (obvious substitutions). Note that I will see which books you have in your library (could be a problem for you), but not the books themselves.
chaley is offline   Reply With Quote
Old 09-25-2022, 05:55 AM   #8
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
Then as I said above, I am confused. What you describe should not be possible. And I can't make it fail.

Are you willing to share your metadata.db with me so I can debug this? If so, zip it up and send it to "calibre-bugs at charleshaley dot org" (obvious substitutions). Note that I will see which books you have in your library (could be a problem for you), but not the books themselves.
I'd rather not, at the moment. In a post above I attached two screenshots, just to illustrate. Later I'll do some testing on a portable install.
Comfy.n is offline   Reply With Quote
Old 09-25-2022, 05:56 AM   #9
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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
I'd rather not, at the moment. In a post above I attached two screenshots, just to illustrate. Later I'll do some testing on a portable install.
Would you post an image of the #r column definition screen?
chaley is offline   Reply With Quote
Old 09-25-2022, 06:03 AM   #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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Never mind. I think I found it. It is an interaction between composites containing 'numbers' and blank columns. Indeed, in this case not #r:true does not equal #r:false.
chaley is offline   Reply With Quote
Old 09-25-2022, 06:14 AM   #11
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
Never mind. I think I found it. It is an interaction between composites containing 'numbers' and blank columns. Indeed, in this case not #r:true does not equal #r:false.
Nice, anyway I'm attaching the metadata.db from a portable install (Calibre 6.5, Windows 10), in which the same behaviour was reproduced
Attached Files
File Type: zip metadata.zip (17.5 KB, 63 views)

Last edited by Comfy.n; 09-25-2022 at 07:17 AM.
Comfy.n is offline   Reply With Quote
Old 09-25-2022, 06:20 AM   #12
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
Would you post an image of the #r column definition screen?
here you are:
Attached Thumbnails
Click image for larger version

Name:	MWSnap0650 2022-09-25, 07_20_06.png
Views:	97
Size:	17.7 KB
ID:	196767  
Comfy.n is offline   Reply With Quote
Old 09-25-2022, 06:21 AM   #13
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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Nice, anyway I'm attaching the metadata.db from a portable install (Calibre 6.5, Windows 10), in which the same behaviour was reproduced
Thanks. The problem arises because you used a "behaves like tags" column type. The search code does fail in this case because it doesn't check tags-like columns for empty.

You can fix it by changing the column type to "column built from other columns". This is what it should be, because it cannot contain multiple values.

In any event I will fix calibre.
chaley is offline   Reply With Quote
Old 09-25-2022, 06:28 AM   #14
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
Thanks. The problem arises because you used a "behaves like tags" column type. The search code does fail in this case because it doesn't check tags-like columns for empty.

You can fix it by changing the column type to "column built from other columns". This is what it should be, because it cannot contain multiple values.

In any event I will fix calibre.
Actually I'm not using "behaves like tags", as the attached screenshot shows:
Attached Thumbnails
Click image for larger version

Name:	MWSnap0651 2022-09-25, 07_27_15.png
Views:	82
Size:	6.4 KB
ID:	196768  
Comfy.n is offline   Reply With Quote
Old 09-25-2022, 06:30 AM   #15
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,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Actually I'm not using "behaves like tags", as the attached screenshot shows:
Sorry. The metadata.db you sent me does use 'behaves like tags', so I assumed the live library did too.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected behaviour of the Calibre "e-book editor" WalterWalter Editor 2 02-18-2022 05:24 AM
Using RE to extract pattern from custom column into another custom column activedirectory Library Management 1 12-15-2019 08:07 PM
Custom column returns value based on value of another custom column? calvin-c Calibre 3 09-14-2013 02:24 PM
Unexpected filtering behaviour with the device ryderark Calibre 8 10-22-2011 06:00 AM
First time user unexpected behaviour dasmotiu Calibre 2 12-14-2010 07:33 AM


All times are GMT -4. The time now is 05:55 PM.


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