How to search by multiple filters

Any suggestions for how to create a multi-filter search interface?

I am looking for a way to search text then click various boxes or dropdowns of tags or other data. This would be similar to Google Drive’s new search chips.

Ex. Search: Farm Tags: [ ] Books [ ] Books Read Publish Date: before 2018

I roughly understand how I could return a result for a specific search with a filter, but I’m wanting it to be more user-friendly and clickable for others who use the site.

Thanks for your time!

Em

PS - I regularly use this forum and just wanted to say thanks to everyone who is so open and collaborative with their various solutions.

1 Like

I built something along those lines a couple of years ago when I was new to TiddlyWiki 5. It involved a lot of conditionally concatenating a filter string to filter the list:

image

image

Each search “chip” saves the value to an underlying state tiddler which is used in the search if not blank.

Since then we have had a lot of improvements with filter prefixes and it probably could be done a lot more elegantly now. The :filter and :map filter run prefixes and the filter[] operator would probably be very useful.

The basic logic is: if state tiddler is not blank, then filter by the value of the state tiddler in the appropriate field.

1 Like

You might find my TiddlyTools FilterGenerators “PowerSearch” useful.

https://tiddlytools.com/filtergenerators.html

As other have pointed out we can now construct what we may call "compound filters"

In my view the “Conceptually easy to understand idea” is that of the subfilter operator.

Eg; filter +[subfilter<farmtags-filter>] +[subfilter<books-filter>]

Coincidently from a technical perspective, this is related to Is there a way to display a tab, in sidebar tabs, only if a condition if met? - #4 by TW_Tones basicaly which is to allow “inclulsions or exclusions” to the result of a filter.

I’m reminded of the ol’ tagsplorer macro by the mysterious FND.

Edit: I note that thread is from 2010… when I had only been around TW for some 3-4 years… does this mean I’m not a newbie to TW anymore now?

You can’t be a newbie and a key player @twMat

You are no longer a newbie!

but you are still entitled to claim ignorance, as we all have to sometimes.

1 Like

Hah, that’s a nice blast from the past. I’ll be sure to tell FND that he is a mysterious figure of legend in TW circles these days.

Thank you! There is a lot here to play with and looks like exactly what I was hoping for.