LightBox
LightBox

Reputation: 3425

What is the difference between sunspot:solr:run and sunspot:solr:start?

Running sunspot:solr:start raises the error

"This command is not supported on i386-mingw32. Use rake sunspot:solr:run to run Solr in the foreground."

Running sunspot:solr:run just hangs. What does run int the "foreground" mean?

Edit

How can one run solr:run and rails s?

Upvotes: 1

Views: 788

Answers (4)

Gopal S Rathore
Gopal S Rathore

Reputation: 9995

Press

'ctrl+shift+t'

to open a new tab in existing opened terminal.

Upvotes: 0

Gopal S Rathore
Gopal S Rathore

Reputation: 9995

  1. The sunspot:solr:run runs the process in the console, in your terminal you can see it and you can stop it using ctrl+c

  2. The sunspot:solr:start runs the process in the background and to stop the process you need to use sunspot:solr:stop, If you do not stop it explicitly then It will be terminated when you shutdown your machine.

Note: To get the accurate search result according to your current logic and code, use rake sunspot:reindex command after running the process using sunspot:solr:run or sunspot:solr:start

Upvotes: 0

kobaltz
kobaltz

Reputation: 7070

RUN

Running in the foreground means that you will see in console the logging whenever a command is called. This is great in a development mode so you can see the system (re)indexing and pulling the queries. Useful for debugging.

START

Start will allow you to run it in the background as a service and is also helpful in production mode where you have the service running without need to be logged in with the console.

When running in production, you will want to do something like this

RAILS_ENV=production rake sunspot:solr:start

Upvotes: 2

Shane Andrade
Shane Andrade

Reputation: 2675

The start one runs it in the background as like a service running on the system, where run just runs it in the console (foreground) where you ctrl+c it to kill it.

Upvotes: 5

Related Questions