Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
307 views
in Q2A Core by
I have a search box on my main site which searches my main articles.   My Q&A site is hosted within my main site.

What I would prefer to do is call a known Q&A API function and have it return a list of matching questions that I could then include in my main sites search results.  Preferably the search results would include some ranking information.

I was thinking something like: http://docs.question2answer.org/code/external/

Anthony

1 Answer

+1 vote
by

Yes, that link is a good start. You have to use it in order to load the Q2A core from the outside world :)

Then, take a look at qa-include/pages/questions.php file, paticularly this line: https://github.com/q2a/question2answer/blob/4fce0eb2390f56b645dad375d1d81e9f91a97e69/qa-include/pages/questions.php#L64

In there you'll see how the questions are extracted and you should be able to mimic that behaviour in your site manually.

by
Thanks  I will look into that...
...