How to use Sphinx search in java

477 Views Asked by At

I'm set up Sphinx and indexed my table. It works correctly in the console, but how i can execute this query in java? Is it possible? I guess Intellij Idea doesn't understand SphinxQL.

1

There are 1 best solutions below

0
Manticore Search On

how i can execute this query in java?

Just work with that as with MySQL (in terms of connection). Few notes:

  • prepared statements are not supported in Sphinx
  • make sure you connect to correct Sphinx's port
  • if you cannot connect try mysql_version_string = 5.5.21

As for the error you see in the IDE - it's probably just because it thinks it's MySQL. Sphinx understands mysql protocol, but the query syntax is different.