When searching the index from your application, you will be using Sphinx Client API. This API is accessed using the search daemon, searchd
, that comes bundled with the Sphinx package. We have seen some basic searchd
options in earlier chapters. Now let's elaborate them.
As we have previously observed, this option lets you specify the IP and port where searchd
will listen on. The syntax for listen
is:
listen = ( address ":" port | path ) [ ":" protocol ]
Let's understand this with a few examples:
listen = localhost listen = 192.168.1.1 listen = 9313 listen = domain:9315 listen = /var/run/sphinx.s
In the first example only hostname was specified. In this case
searchd
will listen on your default port, that is9312
.The second example is also similar in that we replaced hostname with IP address.
In the third example we specified only the port number. Thus
searchd
will listen on port9313
on all available interfaces.In the fourth example,
searchd
will listen only...