Hi Mike I'm going to start with the basics here - apologies if I'm repeating things you already know.
Firstly, you can certainly have Sphinx running on one machine and have your web app on another machine. In this case, you would want ThinkingSphinx.remote_sphinx set to true, and you should have the appropriate Sphinx version in your sphinx.yml for the given environment (simply as "version: 0.9.8.1" should do the trick). And you'll definitely need to set the address (and port, if it's something other than 9312) so the Ruby code can make the connection to the Sphinx daemon (via a TCP socket). You will need to be running the rake tasks on the machine that Sphinx is located on - they do not work on remote installations (as really it's just calling indexer, and indexer requires local file system access to store Sphinx's data). So it's probably worth having a copy of your web app on the Sphinx machine, even through it does not function as a web host. If from the browser's perspective, you are running search on a separate (sub)domain, then you'll need the app on that domain, but Sphinx can be anywhere you like. If the same machine, then address/version may not be necessary, provided searchd and indexer are in the system's PATH. If they're not, that's where the bin_path setting comes into play. If on separate machines, then the previously mentioned approach is what you want. Surendra, there's the ThinkingSphinx.remote_sphinx= setter method, and then the boolean getter available at ThinkingSphinx.remote_sphinx?. I hope this clarifies things. Let me know if you have further questions! Cheers -- Pat On 13/06/2012, at 2:55 PM, Mike wrote: > Hello, > > I've used Sphinx in the past and run/indexed/searched all in one > enviro with no problem. Now I've decided to get fancy and stick sphinx > on it's own url (http://search.domain.domain.com) and I jut can't seem > to get it to connect. > > All the posts, docs, and examples I've found on the web imply that > this can be done but, no matter what I do, I keep getting the same > generic message when I try to test (by running a simple rake:ts): > ***** > Sphinx cannot be found on your system. You may need to configure the > following > settings in your config/sphinx.yml file: > * bin_path > * searchd_binary_name > * indexer_binary_name > > > For more information, read the documentation: > http://freelancing-god.github.com/ts/en/advanced_config.html > > Generating Configuration to /home/foundit_prod/local/etc/sphinx.conf > rake aborted! > Input/output error - /home/foundit_prod/local/etc/sphinx.conf > **** > Also keep in mind there's no special setup on the remote domain (like > a proxy, etc.) so, even when I do connect, how am I supposed to > interact with Sphinx? For instance, I know I could tunnel into the > machine and query Sphinx directly, but that seems to defeat the > purpose of using Thinking Sphinx. Does that 9312 port handle that > transaction? > > Can anyone provide a solution? > > Here's my enviro details: > > Sphinx: v 0.9.8.1 > Thikning Sphinx: v 2.0.12 8100a4a) > > #sphinx.yml > > development: > listen: subdomain.domain.com > port: 9312 > mem_limit: 64M > enable_star: true > bin_path: /home/[user]/local/bin > searchd_file_path: /home/[user]/local/bin > #searchd_log_file: /var/log/searchd/logs/searchd.log > #query_log_file: /var/log/searchd/logs/searchd.query.log > #pid_file: /var/run/searchd.pid > #morphology: stem_en > config_file: /home/[user]local/etc/sphinx.conf > > #development.sphinx.conf > > > indexer > { > #mem_limit = 128M > } > > searchd > { > #address = http://search.foundit-here.com > #port = 9312 > listen = search.foundit-here.com:9312 > #log = /Applications/rubystack-3/projects/fih_3/log/searchd.log > #query_log = /Applications/rubystack-3/projects/fih_3/log/ > searchd.query.log > #pid_file = /Applications/rubystack-3/projects/fih_3/log/ > searchd.development.pid > } > > > #environments/development.rb > ... > > ThinkingSphinx.remote_sphinx = true > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
