Hi - I'm trying to write a fuzzy search routine. At the moment I only know how to search on the Prefix, but this only returns results on exact prefix matches of precise case. What I'm aiming for is something like below.
Let's say I have 3 tiddlers:
"The cat sat on the mat"
"Cat littler needed"
"Fight like fish and dog"
If I type "cat" into the search box, it should return:
"The cat sat on the mat"
"Cat littler needed"
Present code (abridged + working code with debug}:
\define SearchTerm()
[prefix[{{$:/state/ItemSearch}}]]
\end
<!-- SET SUB ITEM -->
Set Parent Item:
<$edit-text tiddler="$:/_opTaskStore" field="itemsearch" tag="input" default="" class='tc-edit-texteditor' placeholder='Test text'/>
<$button set="$:/state/ItemSearch" setTo={{$:/_opTaskStore!!itemsearch}}>Search</$button>
test: {{$:/state/ItemSearch}}
macrod: <<SearchTerm>>
<$wikify name="SearchTermWikid" text=<<SearchTerm>> >
wikid: <<SearchTermWikid>>
<$select field="SearchTermDD" class="tw-edit-texteditor myTextEdit">
<$list filter=<<SearchTermWikid>> >
<option value=<<currentTiddler!!title>>><$view field='title'/></option>
</$list>
</$select>
</$wikify>