sphinx-searchHow to connect to SphinxSearch?
To connect to SphinxSearch, you need to use the SphinxAPI.
import sphinxapi
conn = sphinxapi.SphinxClient()
conn.SetServer('localhost', 9312)
The code above will create a connection to the SphinxSearch server running on localhost
on port 9312
.
import sphinxapi
- imports the SphinxAPI libraryconn = sphinxapi.SphinxClient()
- creates a SphinxClient objectconn.SetServer('localhost', 9312)
- sets the server and port to connect to
Helpful links
More of Sphinx Search
- How to order search results by relevance in SphinxSearch?
- How to specify stop words in SphinxSearch?
- How to use the MySQL protocol in SphinxSearch?
- How to get the version of SphinxSearch?
- How to use SphinxSearch with PHP?
- How to use regexp_filter in SphinxSearch?
- How to use query_log_format in SphinxSearch?
- How to configure max_children in SphinxSearch?
- How to use forward slash in SphinxSearch?
- How to use sql_attr_float in SphinxSearch?
See more codes...