Need help with searching for tiddlers involved with custom fields

How would you search for a tiddler whose field has multiple values, and one of them matches your search, even if it contains a value you did not search for?

For instance, lets say I have a tiddler titled ‘New House Plans’.

One custom field is ‘Status’ which contained the content ‘In Progress’,

and a custom field ‘Group’* that contains the content ‘Blueprint, Project’

and can be selected using something like " <<list-links ‘[Type[Project]]’>> "

Originally I had a colored tag system in place for this but found a bit of a roadblock when I was creating a tiddler that was also a Type or a Status tag. I experimented with a couple other methods of sorting things and came to using fields instead, which is probably the more intended way of handling this.

So, is it possible to keep multiple values inside of a single custom field, and to use a filter to select a tiddler whose custom field contains one of those values? I’ve tried separating by commas and by placing each value in double square brackets but with no luck.

EDIT: Just realized there is a Type field for the content of the tiddler, so lets change the name of that one I proposed to “Group”

Perhaps Search Operator would be of help here? You can limit it to specific fields and use literal flag to ensure you match full words. So for example:

[all[tiddlers]search:Type:literal[Project]]

Will return all tiddlers that contain the literal word Project inside their Type field, so it will match Project, Project, Blueprint, Blueprint, Project and Blueprint, Project, Lobster.

Note: type is built-in field name which you shouldn’t use (and I think TW would make it difficult to use it anyway).

Also keep in mind that search is slow as it has to go through each tiddler and search the field, as opposed to something like [all[tiddlers]field:status[In Progress]] which (from what I understand from Performance docs) is indexed and cached.

Yep, realized that a bit late haha, but if you don’t mind me asking, what is the difference between “Type[Project]” and “field:Type[Project]” ?

Edit 2: I’d liketo rephrase that- functionally speaking, are type[] and field:type[] the same in fuction but field:type is just more optimized? the performance documents says that the “type[]” one is the optimised one, which is a bit confusing.

“Also note that the “field” operator is also used when the operator name is a fieldname, so, for example, [all[shadows+tiddlers]caption[x]... is optimised.” from the docs

1 Like

I have no idea, I never used it that way, I didn’t even know you can!

But going by the description it seems to be saying that if you do caption[x] it’s internally replaced with field:caption[x] so any optimizations that field operator has will also apply.

Either way unless you’re going to have a lot of tiddlers I wouldn’t worry about optimization too much until it starts being an issue.

I’m pretty sure they’re synonymous.

1 Like

My field-search plugin may be of interest: Field Search — lets you search all your fields

Seems your demo video is 404’ing at YouTube Mr. Mario

The channel is https://youtube.com/@pmario
The video is at Field Search V0.4.0 - YouTube