search operator can't search in field of tiddlers with type:application/pdf

57 views
Skip to first unread message

Odin

unread,
May 15, 2021, 6:10:22 AM5/15/21
to TiddlyWiki
Go to https://kookma.github.io/TW-Refnotes/ and copy the code below in a new tiddler. It allows you to search in any field of the all tiddlers that have the 'bibtex-title' field. Search for 'Borio', ' butadiene', '2005' and see how all of these searches give you the same result. Even though it matches values from different fields! Very handy!

Filter and search in table <$edit-text tiddler="$:/temp/refnotes/BibliographyTable/search" filed=text tag=input default=""/> <$button set="$:/temp/refnotes/BibliographyTable/search" setTo="" tooltip="clear searchbox">x</$button>

<<table-dynamic filter:"[has[bibtex-title]search:*{$:/temp/refnotes/BibliographyTable/search}]" fields:"title bibtex-title bibtex-entry-type bibtex-year" pagination:yes>>

Now if you open up the 'borio-1995' tiddler and set its type to: application/pdf it doesn't show up in any search result anymore.

I've been including a _canonical_uri field with a relative path to the PDF file to all my reference tiddlers, so I can keep the article nearby. Unfortunately, this prevents the search operator from searching inside any field of the tiddler. 

Is this intended or is this a possible bug?

A possible workaround would be to include the pdf in another tiddler and transclude this inside the reference tiddler, but I thought I would share this behaviour of the search operator because it took me a while to figure out why the search wasn't working.

Jeremy Ruston

unread,
May 15, 2021, 7:11:37 AM5/15/21
to tiddl...@googlegroups.com
Hi Odin

I couldn't duplicate this problem on tiddlywiki.com, so I think it might be a problem with RefNotes.

I edited the tiddler "Motovun Jack.pdf" to add a field called "something" with the text "now", and then tried "[search:something[now]]" in the advanced search "Filter" tab. As expected, "Motovun Jack.pdf" was returned as the only result.

Best wishes

Jeremy




On 15 May 2021, at 11:10, Odin <odin...@gmail.com> wrote:

Go to https://kookma.github.io/TW-Refnotes/ and copy the code below in a new tiddler. It allows you to search in any field of the all tiddlers that have the 'bibtex-title' field. Search for 'Borio', ' butadiene', '2005' and see how all of these searches give you the same result. Even though it matches values from different fields! Very handy!
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/aa743b6e-5f24-40ba-a189-114f84473787n%40googlegroups.com.

Odin

unread,
May 15, 2021, 10:03:16 AM5/15/21
to TiddlyWiki
Hi Jeremy,

I am troubleshooting on the TiddlyWiki website, without added plugins. I do think I've found something.

Every Tiddler tagged 'Tutorials' has a 'url' field. I set the tiddler 'TW-Scripts by Mohammad' to application/pdf. While using this filter in advanced search filter tab: "[tag[Tutorials]search:url[kookma]]" it shows two results: (because Kookma is in the urls)
2 matches

For me the bug doesn't happen when I specify the field url. But when I use the * to search in any field, the bug happens.  "[tag[Tutorials]search:*[kookma]]" shows one result: 
1 matches
So the difference is between using "search:*" and "search:fieldname"
Normally, the search operator looks into title, tag and text fields. But in this case with the bibtext tiddlers, most information is stored in custom fields, so the search:* is needed to filter on multiple fields.

Kind regards,

Odin
Op zaterdag 15 mei 2021 om 13:11:37 UTC+2 schreef jeremy...@gmail.com:

Mohammad Rahmani

unread,
May 15, 2021, 10:56:28 AM5/15/21
to tiddl...@googlegroups.com
Hi Odin,
 The Refnotes for noting with search so I think this is not related to Refnotes!



On Sat, May 15, 2021 at 6:33 PM Odin <odin...@gmail.com> wrote:
Hi Jeremy,

I am troubleshooting on the TiddlyWiki website, without added plugins. I do think I've found something.

Every Tiddler tagged 'Tutorials' has a 'url' field. I set the tiddler 'TW-Scripts by Mohammad' to application/pdf. While using this filter in advanced search filter tab: "[tag[Tutorials]search:url[kookma]]" it shows two results: (because Kookma is in the urls)
2 matches

 

For me the bug doesn't happen when I specify the field url. But when I use the * to search in any field, the bug happens.  "[tag[Tutorials]search:*[kookma]]" shows one result: 
1 matches



I can confirm this

[tag[Tutorials]search:url[kookma]]

2 results

[tag[Tutorials]search:*[kookma]]

1 results


 

So the difference is between using "search:*" and "search:fieldname"

It seems there is something wrong with star *

 
Reply all
Reply to author
Forward
0 new messages