I have been using this plugin for maybe two weeks.
It is great but one issue I find is the way it handles search strings of more than one word - for instance if I search for dog cat
The native Tiddlywiki search seems to register two types of hit - I am already using the Context plugin with search ( $:/plugins/danielo515/ContextPlugin )
-
If the separate words are found in that order in a tiddler then register that as a match - ie exact string match.
-
If the separate words are found but not in that particular order in a tiddler then list the tiddler but it’s not considered a match but it is a result displayed in the search pull down which lists tiddlers that register hits.
In contrast the search and highlight plugin which otherwise works harmoniously for me seems to consider any occurrence of any of the words a match which is then highlighted and counted in the search and highlight counter.
This means if I enter 4 words then the results I see are effectively the superposition of four separate searches conducted for each of the words separately.
Neither search criteria is wrong or right in my view although I find the highlight plugin criteria less useful because when I search on multiple words I am interested in them appearing in that order sequentially - either an exact string match or something very close ( close might mean flexibility in multiple spaces, punctuation etc ) - I would be happy with exact matches only.
However with both the search and highlight results and the regular search being closely integrated on screen it feels inconsistent when the regular search reports 68 matches and the search and highlight reports 1103 matches - this being a real search I conducted.
My initial take on the most useful behaviour for the search and highlight plugin would be that it would only register and highlight exact string matches or something close as described above.
Some people might find the existing search and highlight behaviour useful?
For instance if they supply a search string of cow cat dog they might be interested in visually identifying paragraphs where more than one of these words occur but not necessarily in that order and not necessarily sequentially.
I don’t expect both search methods to produce the same number of results - the search and highlight only considers tiddlers currently on the story river but I would prefer the search and highlight to produce fewer rather than vastly more results than the regular search when I search for more than one word.
One argument for stricter conditions for a hit in the ‘search and highlight tool’ is if someone wants to search for a phrase like guilding the lilly or passing the buck - the presence of the word the will surely overwhelm the results although this argument might also apply to some extent to the existing base search functionality?
Thoughts anyone?