QUOTE (asimaythink @ Jun 1 2008, 04:30 AM)

QUOTE (hass @ May 24 2008, 07:11 PM)

This highlights search terms ... and much more.
For example, if I do a search for "Arc de Triomphe" (for my paris blog) I get highlighted results for words such as
DEcember and
DEcide.
Anyway to fix that?
Cheers

Hello hass,
sorry for the late answer.
I think you mean only whole words shall be highlighted (bla bla
de bla bla
but not bla bla
de bla).
My regex searches for ocurrances of the strings, not for words itself. You'd have to modify the regex for this, and this is where it starts to become complicated, as you'd have to define what a word is (not linguistical, rather "what it looks like": a sole string that must be either preceded or followed by a space, except when (partially) embraced in quotes, braces etc., maybe followed by a dot, by comma, by semicolon etc, and all the other gazillion variations over this). So I'm afraid this would be just too complicated.
So, yes, there's a way to fix that, but I'm sorry, it's not easy. Once MT 4.2 goes final, I'll surely look into this again as this version has search refined.
- Ben
Thanks Ben
No, currently the search pulls up partial word matches too. So, for example, when searching for the word
me I see the letters M amd E in ca
mera highligthed. Similarly, if I search for "psu" then I see highlighted Lorem I
psum.
Naturally, this makes the utility of this code somewhat limited since it has the potential to pull up too make false hits.
However, if you are going to fix this in the future, please consider two requests in addition to the highlight search terms:
First, that the highlighted search terms should be displayed in the context of the sentence that the terms appear in, rather than the entire body of the enry. So for example just show the highlighted terms with 10 words before and 10 words after.
Second, that there be a way to selectively limit the search by category and by date range, and ideally a way to sort the search results by date order and number of hits (relevancy) and such.
If MT provides this more robust search functionality, and finally makes an easy way for people to re-order their categories list rather than resort to workarounds, that will remove two issues that are unecessarily making life hard!
Cheers