Forum search doesn't show results on first try

There where some problems with the search indexes… Qiang fixed them, so now it should work…

It’s a lot better this evening. Although I’m still getting “Your search did not match any documents.” about 25% of the time. Getting better though.

You need to be specific:

Yii site or Yii forum? :)

The extension search works now! :D

And so does the global yii search.

Yes, I’ve noticed the various search functions are not working as expected. In several cases I’ve search for something from the tutorials section and get a screen indicating nothing is found. This screen also has a search function with my original search term already filled in. When I click search again then I get a proper result set.

Maybe not a big deal but it is bothersome and isn’t the best testimony about the YII framework (assuming the website has been programmed with YII).

There are few parallel posts / reports on forum / site search failing to work as usual past weeks (months?).

There are situations, where search returns no results, while it obviously has to return at least one (searching for just a class name like CGridView) or when search fails, showing no results, after going to next page, even though on first page there were to many results and paginator was introduced.

I’ve heard that dev team / admins are aware and are making efforts to fix this problem, as search engine is probably the most used element of Yii website.

Doing search through Google is a quite good idea (noticed few days ago, that Google is able to index posts on forum 2-3 hours after publication!), but of course temporary, and would be really nice, if responsible people would finally found out, what is going on and fixed it.

There is one trick, to get correct search results, that works both on forum or site searches. SO, when you get no results for search, just hit refresh button, and you will get more results. I know it is weird, but at least it works.

I would say, that you were just lucky on that. I had many situation, where hitting refresh after getting results returned no results next time. In my opinion, forum search is just worse working last days. And we need to wait for a fix or get used to it. Let’s assume that Yii popularity is so high that search mechanisms are dying! :]

I’ve done a lot of stuff for IPB and even worked on some of their releases and various community projects so am familiar with the code base. The bugs seems to be from Yii’s cross site implementation with the wiki and other services as by default IPB doesn’t work in this way. I’m not sure if they hacked the code or created a hook to the search engine which it supports for applications. Either way it seems that has caused all the issues in the search.

Just to guess it seems like it might be an timeout issue or something in the search process failing in certain instances as repeating the search a few times usually yields the desired results eventually. I would recommend investigating it a little further but also consider moving to sphinx search engine which removes the minimum character limit and makes the search system much faster.

There’s three threads on this(that i’ve found), I posted a possible reason and solution in: http://www.yiiframework.com/forum/index.php?/topic/13618-forum-search-sucks-big-time/

merge topics maybe?

Thanks, merged.

The search backend is running Solr. There seems to be some problems in returning a timely response (we timeout the backend at 5 seconds). We’re not sure what is causing the search backend to hang. It could be some disk problems.

Yea timeout issue was my guess (yay me). Try looking into whether sphinx is a possible solution for handling the search, it creates it’s own index so as it won’t actually fix the problem but it makes the problem void because it won’t use the same process therefore fixing it…