Hi, I have big problem. We creating knowledgebase about some architectural items. I have tiddlers with some fields (description, obligation, etc.). Record of obligation I generate using transclusion by self-made little template drawing it from tiddler´s fields.
And now my problem: Standard search editbox on TW searches only in title and text fields, so it cannot find any item, because their text fields are drawen by transclusion of template from fields. Is there any way to modify edit box to search for another fields too? I want complex search by text, description, obligation fields at once.
Many thanks for both usefull method, but… Users are lazy and best method for me is to customise default search behaviour. Yes, we as power users can quickly switch to another tab on search results, but normal users wont it.
The solution I gave you creates a new search tab, under the standard search. So it is not like it will not be noticed, but I understand you want these alternative fields searched. You can modify primary search directly, although that is somewhat different to achieve to my prior instructions.
Here is what I found with a little reverse engineering of the standard search;
The default search results are generated here $:/core/ui/DefaultSearchResultList
The normal behaviour is;
one search based on the title only, in the field first-search-filter [!is[system]search: title<userInput>sort[title]limit[250]]
Then a search based on the text field second-search-filter [!is[system]search<userInput>sort[title]limit[250]]
This preferences search results where the search string is in the title, then see the search Operator which defaults to
field list: a comma delimited list of field names to restrict the search, defaults to tags, text and title if blank.
So there are a few different ways to handle this adjustment.
For example use a second-search-filter that searches all fields
Normally I would hide the default behaviour and display a modified search in the sidebar but the standard sidebar search is a little convoluted to do this.