Search code examples
c#connectionsphinx

Sphinx Search Engine + .Net : How Can I Connect to Sphinx through C#?


I installed and configured sphinx search engine (v. 2.2.11) in ubuntu and integrated it with oracle database to retrieve and index data from oracle. I also can submit query through sql client of sphinx by using command line and every thing is ok.

Now my question is: How can I connect to sphinx through C#? There is no official API for .Net.َAlthough there are several 3rd party APIs, some of them not free and some will not be updated anymore. I also saw SphinxSE that is a mysql storage engine and According to what I understood, Only used when data is stored in mysql but my data is stored in oracle and I use odbc for integrating oracle and sphinx.

So, Should I write an api myself or there may be other ways?

Thanks for any suggestion


Solution

  • Just use SphinxQL and connect to your Sphinx instance using any mysql library. Just make sure sphinxql is enabled in your config, you should have smth like this:

    listen                       = 9314:mysql41
    

    This tells Sphinx to accept connections from mysql clients on port 9314.