Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_fuzzy_find: making search results less precise
Els wrote:
First, how this plugin works is a complete mystery to me
And me :-)
I installed wet_haystack and it would be great if smd_fuzzy_find could use the same search index. Is this possible at all?
I have no idea right now. I saw wet’s plugin earlier and thought “damn clever”. Leave it with me and when I do my “4.0.7 update check” for all my plugins I’ll see if this needs updating to take advantage of the full text searches and if it can read stuff from wet_haystack.
Thanks for reminding me, I’d almost forgotten about this plugin.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#17 2008-11-30 19:41:31
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_fuzzy_find: making search results less precise
I wrote:
you are the fastest replying plugin author I know!!
I need to repeat myself ;)
Thanks!
Offline
Re: smd_fuzzy_find: making search results less precise
New version is out:
v0.2 | compressed | Requires smd_lib v0.33 and Textpattern 4.0.7
Features:
- Support for wet_haystack; searches whichever database fields you tell it
- Improved search accuracy so it tries not to return partial words
- Hopefully is not restricted to ASCII text any more: it only filters out Unicode punctuation and leaves everything else intact
- Added container ability
- Added
delimoption - Enhanced category/section matching to allow looking at
<txp:variable />and URL vars (using smd_if, you could now offer “advanced” search facilities where visitors can choose how fuzzy they want their search!) - Renamed
subcatstosubleveland extended it to allow you to choose how far down the tree you traverse - Fixed some edge case bugs
- Improved plugin help and debug output
Try it and see how you get on, reporting any plugin misdemeanours or enhancements here as always.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#19 2008-12-03 11:56:38
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_fuzzy_find: making search results less precise
Thank you! I installed it right away last night in my local install, started playing with it, and this morning I overslept… ;)
It’s looking great, wonderful to have it search my keywords (tags) as well. The search accuracy definitely seems to be a lot better! I’ll put in on the live site this evening.
Thanks again :)
Offline
Re: smd_fuzzy_find: making search results less precise
just got around to trying this, and not surprisingly it’s another minor classic from Bloke :-)
thanks Stef
Offline
#21 2009-04-07 20:52:24
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_fuzzy_find: making search results less precise
This is silly… I’ve been using this plugin for ages and only now I notice that there is no sort attribute for the smd_fuzzy_find tag. Even sillier is that I have if_different in my search_results form (and sort="section" in the article tag) to display the section titles and only now I notice that the fuzzy_find output is of course looking quite messy because those results are not sorted by section…
So, since I managed to overlook this for a year or so, I guess it’s not that important ;) But I’m still curious if it would be easy to add a sort attribute… If it isn’t, never mind, I’ll just remove the if_different.
Edit: nevermind, please forget the request. I decided it’s a better solution to just show the words, not the articles.
I have another question though, Stef. I just updated from 0.2 to 0.21, but forgot that I messed with the plugin code (again… bad habit, I know) to output a question mark after every suggested word. And now I can’t remember how I did that… everything I try gives me an internal server error, which of course serves me right :)
Last edited by els (2009-04-07 21:42:57)
Offline
Re: smd_fuzzy_find: making search results less precise
Els
The search results are supposed to be (emphasis on supposed) returned in weight order, i.e. the most likely candidates at the top. I’ve not looked at the code for a while so I don’t know offhand if it’s possible to reorder the output by some arbitrary means. But if it is possible I’ll make it so in the next release.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#23 2009-04-08 16:57:29
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: smd_fuzzy_find: making search results less precise
Bloke wrote:
But if it is possible I’ll make it so in the next release.
No, please don’t! I’ve left the search results out now, and actually I like it better this way. So just forget that I asked, OK? Apologies for waisting your time!
Offline
Re: smd_fuzzy_find: making search results less precise
Hi Stef, thanks (againnn) for a brilliant plugin! Please can I ask a likely stupid question, it says I need to use smd_lib v0.33 — is it OK to use the latest ver of that, I’m about to use 0.36?
Tks! Cheers, -Alan
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
Re: smd_fuzzy_find: making search results less precise
alanfluff wrote:
is it OK to use the latest ver of that, I’m about to use 0.36?
Sure thing. I should update the docs really and remove any such version information from the plugins, as smd_lib is now stable enough and backwards compatible enough to not warrant it any more. Go for it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
Re: smd_fuzzy_find: making search results less precise
Splendid! Tks, cheers, -Alan
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
Re: smd_fuzzy_find: making search results less precise
Sorry where do I put the attributes for this plug in.
like if I want to use match_with=“keywords, title,body,excerpt,category1,category2”.
Where would I put that?
its a bad hen that wont scratch itself.
photogallery
Offline
Re: smd_fuzzy_find: making search results less precise
kvnmcwebn wrote:
Sorry where do I put the attributes for this plug in.
In the usual spot in the smd_fuzzy_find tag! If you want to match with some other fields than the default title and body, specify them like this:
<txp:smd_fuzzy_find match_with="article:body;title;excerpt;keywords;category1;category2" />
Last edited by Bloke (2010-05-28 08:51:54)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
Re: smd_fuzzy_find: making search results less precise
ahh thanks, i was using commas to separated them with a space.
its a bad hen that wont scratch itself.
photogallery
Offline
Re: smd_fuzzy_find: making search results less precise
Hello,
is this plugin able to work with non latin character sets?? For example Cyrillic?
I tried it on a Russian language website and it failed, so I suggest, that the plugin can´t handle letters other than latin ones.
Offline