Is there a Search within tool anyone has created?

Folks,

I am wondering if anyone has built a tool that uses a full keyboard interactive search like that in the side bar but the search can be limited to a filter that “seeds the search”, since its only searching a subset of tiddlers perhaps it will search all fields.

The Editor toolbar Link icon and sidebar segment search do what I want but I would like to be able to put it in a tiddler along side a list of tiddlers, allowing only those par tof the same filter to be searched.

  • It seems something that would have already been needed.
  • The search mechanism is quite involved with the keyboard widget, dropdown etc… and the custom search tabs so I would like these to be part of the solution.

I have made some attempts to reuse the existing link or search but so far with no luck so far.

I have long felt this would be a very useful feature, for example being able to search only open, recent, history or some custom list, or tiddlers with a give tag etc…

I do not want to use one of the dedicated search tiddlers, just insert this in along side a given list.

this reminds me of list-search a bit?

Agreed that limited searching can be extremely helpful though.

Probably not exactly, what you ask for but I did create ASP Advanced Search Plus, which allows you to keep search results around.

When I do some developing, I found out, that I do need to follow a trail. eg: show all tiddlers tagged $:/ViewTemplate, Then search for something else. → After some searching it turns out I do want the list of the tagged tiddlers back. … and so on.

See: [INTRO] Advanced Search Plus (ASP) - for advanced users and developers

Edit: ASP works well together with the field-search plugin, which also can be used stand alone: Field Search — lets you search all your fields

2 Likes

Using https://tiddlytools.com/#TiddlyTools%2FSearch%2FFilters, first select or enter a filter to “seed the search” with a list of tiddlers.

Next, in the text input that appears below the filter input, enter any text or a regexp pattern to match against fields of the tiddlers that are listed.

To the right of the “search for text” input, there is another input control that defaults to “title”. If you put the focus in this input control, a multi-select popup list of possible field names is displayed. Note that this list includes only those field names that occur in the tiddlers that were matched by the “seed the search” filter.

My custom search is housed in a tiddler which is linked to from the sidebar.

First stage of search is by any number of tags - this part is an AND search not an OR search.

Then follows a text box for non-literal search ( case independent ) this is an AND search but words in any order and any position.

Then follow text boxes for literal search ( case independent but requiring a complete phrase match) - unlike the non-literal search boxes there is a case for having more than one text box so that multiple phrases can be searched for.

The output is at the bottom of the tiddler - a list of tiddler titles expressed as links adjusts in real time as I play with the controls above.

It’s crude but has enabled me to target frustrating fragments from my memory in order to locate those tiddlers that are on the tip of my tongue, in particular the live feedback in terms of the list of eligible tiddlers at the bottom enables me to adjust my ‘probe’ words and tactics until I feel I am getting somewhere. As my wiki gets bigger and bigger I am finding I need ever increasing search power.

Thanks for your points, after reading that I am tempted to add an option to use filter on all tiddlers on storyriver as well as the usual all-non-system-tiddlers.

Thanks all, I will look at your suggestions in detail soon but I really want to call a macro with a filter, have a search value entry field appear and when I start typing a drop down appears like the standard search, with results only drawn from the titles comming from the filter.

  • although it is simple to use there is some complexity behind the standard search.
  • I can see it having lots of applications when given along side Any list eg search only the toc tiddlers, search tiddlers in a specific plugin or all tiddlers with a particular tag or keyword where the filter scopes the search.

In some ways this is quite specific and can make use of the existing search mechanisiums and code. But I cant see where to start.

Oh boy, aint that the truth. Here’s my latest, to help me find “that macro that …”

Still not ready for prime-time though:

1 Like

https://keatonlao.github.io/tiddlywiki-xp/#%24%3A%2FFilterBuilder

From tiddlywiki XP

3 Likes

Again there are some wonderful solutions here but not what I raised the topic for. I dont mind if we continue to collect search within tools, but let me restate my original need a little better.

A search in place that only searches the in scope tiddlers. A minimalist interface for searching a subset.

  • Idealy with the same behaviour as standard search.

I do think we can all benifit from this approach so if we can leverage core code we could add this facility to the core, minimal bytes, it could be used to search within open, recent, history …

1 Like

I’m completely ignorant of the subject, and I don’t know if this helps or is what you’re looking for, but:

What if there was a way to “search within search”? For example, with standard search I do any search and get a list of resulting tiddlers. Can I save this list of results somehow to then use it as a basis for subsequent research? (like maybe as a filter and then a subfilter, but without having to write it explicitly)

Could this be useful? (maybe I said nonsense, but if maybe it is useful so I thought I’d say something :joy:)

That is much what i am looking for and I have made a version but want to give it the first filter and search within only the resulting tiddler with the search dropdown.

TiddlyTools/Search/Filters let you do a 2-level search:

  • First it searches based on a filter that you can enter or select from a list of saved filters.
  • To perform a search similar to the TWCore sidebar search, you can use a filter like this:
    [search[...]], which will look for matching keywords contained in the tags, text, and title fields of all non-shadow tiddlers.
  • Then, below the filter input is a separate input control in which you can enter text or a regexp pattern to interactively search within the tiddlers matched by the filter search.
  • By default, this interactive search looks at the titles of the matching tiddlers, but there is also a multi-select droplist of fieldnames that you can select (use shift-click or ctrl-click to select more than one field). You can also enter * to search in all fields without having to select them from the list of fieldnames.

I am very impressed with the solutions here, but I would be inclined to categories them as advanced search tools, I will revisit the thread again today for the details.

  • However they are all about a place you go to undertake more sophisticated searches, and yes you may be able to search within something. I can see using these as an advanced analytics and research tools.
  • I think the answer to my original query is “that no one has yet done what I was asking for”, a minimalist (apparent) interface with which to publish a range of “in context searches” seeded with a static filter within the wiki;
    • An example may be a search dialogue above the TOC in the contents tab that would allow you to search only in the TOC
    • Or in a project tiddler than only searches tiddler in the same project…

To move forward I have cloned $:/core/ui/SideBarSegments/search and customising it to meet my requirements. I will share back, and still open to suggestions.

I have finally revisited this and come up with a context search;

  • It is very low code

Basically I define a global function;

\function search.context() [get[title]]
  • This basically does nothing, but pass through any titles given to it.
  • I then insert search.context[] in the various first-search-filter and second-search-filter such as found in $:/core/ui/DefaultSearchResultList

However in a given tiddler, for example the TableOfContents tab I redefine the function, and transclude $:/core/ui/SideBarSegments/search

\function search.context() [tag[TableOfContents]]

{{$:/core/ui/SideBarSegments/search}}
  • Now I have an incontext search, it will only produce results that also have the TableOfContents tag.
  • Now install $:/plugins/yaisog/descendants-filter and change the function to;
\function search.context() [tag[TableOfContents]descendants[]]

{{$:/core/ui/SideBarSegments/search}}

This allows you to search the whole Table of contents and only the table of contents. From within the table of contents tab. That is “in context”.

I am going to improve the UI and add some practical features.