First time here? Check out the FAQ!
2

Best practice for customizing search behavior?
 

I'm looking to customize the default search behavior, to return additional results besides asked questions. Could you please recommend the cleanest way to do that, minimizing changes core Askbot code.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
theactiveactor's avatar
167
theactiveactor
asked 12 years ago

Comments

see more comments

1 Answer

2

Probably for this askbot should expose the search API and allow you to display search results combined from several sources.

There is no solution for this at the moment, but this could be part of askbot.

If you are willing to experiment with this - take a look at function askbot.models.question.ThreadManager.get_for_query(), there is also a more complex function in the same class called run_advanced_search().

Maybe you could implement this and make a pull request on the Github?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
link

Comments

see more comments