0

I am thinking of using django-sphinx-db https://pypi.python.org/pypi/django-sphinx-db

Before I install it, just thought I would check:

Is it possible to join the special sphinx tables with the regular mysql tables? Can I do this using raw queries?

Any other thoughts on django-sphinx-db? Any reason I should not use it?

I plan to index some text content in sphinx, but will have the matching images in a mysql table. So I would need to do a join of the content table and the image table.

user984003
  • 28,050
  • 64
  • 189
  • 285

1 Answers1

0

Is it possible to join the special sphinx tables with the regular mysql tables?

No.

SphinxQL (and hence django-sphinx-db) is a seperate 'server'. So you connect to mysql to run mysql queries, and searchd to make sphinxql queries. They are on seperate physical servers with seperate connections.

With django-sphinx-db you would use it to manage a connection, to the SphinxSearch instance, and your favorite system for accessing mysql server.

You run the sphinx query, then fetch documents from mysql. Performing the 'join' in application code.

--

For joining need to use SphinxSE. Then you just use normal connections to mysql server, to run queries (the mysql server, via SphinxSE internally runs that actual sphinx query) http://sphinxsearch.com/docs/current.html#sphinxse

In theroy can also use the FEDERATED mysql engine, to similar effect to SphinxSE. Just using FEDERATED to proxy though to a sphinxQL backend. But it will probably be tricky to get it to work.

barryhunter
  • 20,886
  • 3
  • 30
  • 43
  • Thanks, this is as I suspected. Do you know if there is there a speed difference, running it via django-sphinx-db or SphinxSE? Maybe there is some connection overhead each time a query os run or...? I'm just as concerned about insert speed as search speed. – user984003 Jul 29 '13 at 15:32
  • ITs an apples-to-oranges comparsion. They are two totally different technologies/approaches to the problem. Which to use is not a performance question. – barryhunter Jul 29 '13 at 15:40