Not only can you experience AnswerHub firsthand, but you can also ask and explore questions and answers about AnswerHub.
To get started, try typing a question in the search bar. If your question hasn't been asked, try posting a new question.
If you are a current customer, please use the Customer Success portal instead of this communtiy.
I observed that search does not return any results from the question body (details). How can I solve this problem?In my case I use MySQL back-end.
Answer by evgeny fadeev · Mar 30, 2010 at 11:36 AM
well, the actual search implementations differ, depending on the engine. Currently there are three levels.
probably now you'll get best results for search with sphinx (because you also get to search in the answer bodies), but you will be limited to english and will have to do a little configuration. You also may have issues running sphinx daemon process (searchd) on shared hosts.PostgresQL, on the other hand has much better support of word stemming, there may be even a dictionary for your language (romanian?), so if pgsql search could be extended to search in answers as well, that would make PostgesQL a clear winner. Take a look at the postgres dictionary doc page. to use sphinx you'll have to disable postgresql fulltext module default search method for mysql is not very useful as you can see, it is not difficult to add search in the text body, but word stemming is harder and best handled by a specialized package or the database itself.
Answer by Hernani , Qato lead developer and father of Tiago · Mar 30, 2010 at 01:07 PM
Hey Sorin, well, the system is in place to make search available through any possible engine that can communicate with python. We just need the implementations. We currently support the ones that Evgeny talks about, which is Sphinx, part of the work he did before, if the database engine is postgresql we take advantage of their FTS capabilities, which are a lot more than only word stemming, but currently lacks support to search the answer body, and simple sql text matching which is the default.
Before we advance on other implementations/improving the ones that exist there are a couple of things we need to figure out. First we want to Introduce the "post" notion into the database, that is, make questions and answers live in the same table. It's hard to implement itself, but the data migration will be a small pain, mainly because of common shared keys.
After that, searches can be more powerfull than ever. But I'm guessing you can't wait for that, so here's how you can make it work for mysql FTS capabilities. Creat a module folder inside forummudules, lets say 'mysqlfts' and an empty init_.py. Then create a handler.py file and add the following content:
from forum.models import Question def question_search(keywords, orderby): return Question.objects.filter(deleted=False).extra( where=["MATCH (tagnames, title, html) AGAINST (%s)"], params=[keywords] )
That should give you a good simple implementation for now. Just don't forget to disable the others, like the postgresfts or sphinxsearch, although they will not work if you're not using postgres or don't have sphinx installed.