Hello, Thank you and How to search through data tiddlers?

Hello All,

I am new to this forum, but a long time (~18 years) user of TiddlyWiki. I have tried other knowledge management systems, but have always come back to TW. Thanks to the community, I have learned a lot about how to tinker and play with it.

Recently, I came across @Mohammad 's Mehregan and have been using it for the last 4 months or so. Thank you very much - it’s very useful.

I love the interstitial journal integrated in the daily journal - just a the right bit of ease with which one can quickly enter things, thoughts, notes, without much distraction.

The thing I have been struggling with though, is that these journals are not searchable – at least I haven’t found a way to make them searchable.

Any ideas on how to make the interstitial journal searchable?

Yes, I have tried the full blown task list (and it is searchable) and it’s great to keep track of well defined tasks. But I find that it’s too heavy weight when I want to quickly jot down a quick thought/idea - without getting distracted from the task I am currently working on.

In an attempt to extract the data from the json tiddlers, I could figure out how transclude the data into a new tiddler, but that’s still not searchable. I couldn’t figure out how to extract that text and append it to the day’s journal programatically.

Here’s the extract macro. Instead of transcluding the
index, how can I extract it and append it to the current journal?

Of course, I’m open to any other ideas for making the data tiddlers searchable too!


\define extract(tiddler)
<$list filter="[[$tiddler$]indexes[]]" variable="itemdate">
<div class="kk-todolist-row">
  <div class="kk-todolist-done" style="width:2.6em"><b><$view tiddler=<<itemdate>> field=title format=date template="0hh:0mm"/></b></div>
  <div class="kk-todolist-desc"><$transclude tiddler=<<__tiddler__>> index=<<itemdate>>/></div>
</div>
</$list>
\end

Thanks All!

Hello,

EDIT: My understanding of the OP was search via filters, versus search via the TiddlyWiki search field in the sidebar. The following applies to search via filters, and totally non-applicable in respect to search via search mechanism in the sidebar.

Without any tiddlers to play with, I used one of my own TiddlyWiki instances to test out filter operators.

Just treat data tiddlers like any other tiddler, and setup your filter operators to look for particular snippets of text in the text fields.

For example, if you want to try in this TiddlyWiki instance’s advanced search:

[type[application/json]regexp:text["qbe_fact_status": "Fact"]]

"qbe_fact_status": "Fact", that’s the name-value pair (i.e. “qbe_fact_status” is the index name, “Fact” is the index value). Nice and simple, but that can be tweaked any way at all to take full advantage of all the filtering goodies TiddlyWiki has to offer.

Knowing this, now it is just a matter of setting up the details of your filter.

What do you think?

You need to write your own search engine. One of the frustrating things about Wikitext is how many filter operators we still don’t have. In this case, “values”. We have indexes[], but not values[]. Anyway, this will do a basic search. It uses the regular search box for input. A fancier one would use it’s own search box. But this should give the idea

<$list filter="[prefix[$:/todolist/data/tasks/]]" variable="tiddler">
<$list filter="[<tiddler>indexes[]]:map[<tiddler>getindex<currentTiddler>]+[search:title{$:/temp/search}]">
<$link to=<<tiddler>>><<currentTiddler>></$link><br/>
</$list></$list>

So if the search text in is “woke”, we get at the Mehregan demo page:

I woke up at 7:10 today. It is quite cold. Outside is a little dark. It was rainy
I woke up at 9:15! Lat night I was working by late and I finished most parts of Thinkup!

1 Like

Welcome Bot.

Just for clarity searching data tiddlers is not the issue it is searching system tiddlers, to those beginning $:/ in this case the data tiddler begins with this. The other place to watchout for is when tiddlers can be in plugins or are shadows.

  • You can search these data tiddlers mentioned from the Advanced Search System Tab,

Default side bar search dropdown

Also You can provide an alternate tab within the results of the side bar search

  • Clone and modify $:/core/ui/DefaultSearchResultList and the filters within, note the tag $:/tags/SearchResults which adds these tabs to the search (alternative search results tab)

Whatever you search for must be in the standard search results for the dropdown to appear and the other search’s do not contribute to the search count.

  • A little tweaking of the search filters is needed,
  • I will see what I can find.

You could have a closer look at my field-search plugin: Field Search — lets you search all your fields

After importing the plugin, the default settings should already be enough. See 1,2,3,4 at the image :wink:

The info is also available in the AdvancedSearch tab

Thanks! Not exactly what I was looking for, but good to see an example of regexp

Thanks All.

@Mark_S. Yes, I found that we are missing the “values” operator.This is a good starting point.
@TW_Tones The underlying details of how to create additional searches is very useful.
@pmario - I browsed your Field Search and the linked video. I can see many more uses for this plugin. Thanks for sharing.

2 Likes