Nice stuff!
I also recommend to have a look at
https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM#z=qvnb1tyGX-Zfd0n7kl_Moj-d
-Mohammad
On Saturday, August 3, 2019 at 6:36:33 PM UTC+4:30, MagoArcade wrote:
>
> 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>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/2b1739b6-92d8-43ec-83d8-4343347af665%40googlegroups.com.