Friday, September 20, 2013

My answer to "Search Doesn't appear to be searching Titles"

This is my answer to a Question on Support site for LampCMS project


Fist about title search: try searching "searching titles" on this site. You will find this question, confirming that searching by title works.

Second: comments are not added to search index, so searching in comment does not work. This can be changed but will require tweaking indexer and search.

At this time search is powered by MySQL Full text search feature. One thing about MySQL full text search is that it will exclude documents from search results if the results are not unique enough. For example if you have just 3 questions in your new database and 2 of the questiosn have "building widgets" in the title, then searching for 'building widgets' will not return any results because MySQL will consider the results to be too common. I think document must appear in the index in less than 50% of documents to be returned in results.

Read this document:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html

Especially this paragraph:
"The search result is empty because the word "MySQL" is present in at least 50% of the rows. As such, it is effectively treated as a stopword. "

No comments:

Post a Comment