views:

36

answers:

1

I have set up Sphinx to index three tables in a MySQL database, each to its own index.

The problem I'm having is that it doesn't return which index each match belongs to, so unless I'm searching an individual index, the results are fairly useless.

The search app included with Sphinx displays the index along with the matches, is there any way to get the API to do this as well?

I'm using sphinxapi.php.

+1  A: 

There are a couple of options that I can think of off the top of my head. I don't have Sphinx installed here but I do use it and find that its a fantastic indexing solution!

1) Rebuild your indexes with IDs that help you identify the index they came from. For example in index_1 append '1_' to whatever your unique ID is. You'll always know where it came from in this way.

2) Search your indexes separately and combine the results after the search is completed.

There are probably many other ways to accomplish this.

thetaiko