Closed alexanderadam closed 4 years ago
Hi @alexanderadam :)
You're pretty much correct in your assumption - almost all tasks must be run locally.
ts:start
, ts:stop
, and ts:restart
all need to call Sphinx's searchd
executable.ts:configure
needs to save the configuration file in a location that Sphinx can access (thus, local file system)ts:sql:index
needs to call Sphinx's indexer
executable.ts:clear
deletes existing index files (local file system).ts:rebuild
calls all of the above, and thus must also be run with a local Sphinx.The one exception, really, is ts:rt:index
- because that's just sending data to an already-running Sphinx daemon. Of course, if you're running ts:rebuild
, it'll call that task for you as well, but it'll also call all the other tasks. So ts:rt:index
will only work if you're calling just that task remotely, and the rest locally.
Sphinx has no way to interact with the daemon state remotely - so if you do want to run remote daemons, you'll still need a copy of your Rails app on the Sphinx server/container, and for that to be able to talk to your database.
Thank you @pat, for responding so fast! So what is the usual workflow for using TS with a Sphinx container? Do you have any recommendation?
To be honest, I'm not entirely sure of the flow - I've not used Docker much myself, and never with Sphinx. However, others have shared their attempts and approaches in #1010 and #1131, so I'd highly recommend reading those issue threads :)
Awesome, thank you and have a wonderful day!
Hi Pat,
so first of all: thank you for your work!
I just have a small question: So thinking sphinx supports remote daemons which is great if you want to use Sphinx in a Docker container. But it seems that most of the tasks are relying on a locally running daemon including stuff like rebuilding real-time indices (
ts:rt:index
).Are such things simply not possible and/or needed when the daemon runs on another machine?