Contents search widget
Posted 15 May 2009 - 04:05 AM
Actually, though this is the enhancement of the yii-blogdemo-enhanced, it can be applied to the original blog demo because this does not related to other enhancements much.
Posted 16 May 2009 - 07:15 PM
I have confirmed this. BTW, as I have raised the discussion on a bug as follows, please be careful. I surely am going to fix it.
Posted 11 July 2009 - 09:07 AM
and you search for "something unexpected", I suppose there won't be any match because of the formatting.
It'd be better, if non-word characters were acceptable between search keywords in my opinion.
Yet there will be questions without answers, because if you had a post something like
pointing to an <a href="http://example.com">external</a> site
and you were looking for "external site", searching would not return this post either.
(You probably want to search in pure markdown text, but the case is not different in it either.)
I'm looking forward to hearing your opinion.
Posted 12 July 2009 - 10:54 PM
I actually had a trouble with markdown languages as you mentioned. At first I tried to search the words in Post.content, but changed my mind to search in Post.contentDisplay with this reason. And I added the functionality to ignore the contents in the tags starting with '<' and ending with '>'. This is the current algorithm. Do you think you may have a better idea?
Posted 13 July 2009 - 03:24 AM
Let's assume we have
dash - between
in our post, now if we tried to search for "dash between", won't this script find anything, will it?
Thus I still recommend to accept nonword characters between keywords.