Hey :)

Running the regenerate command does a bunch of things:

* stops the daemon
* deletes the existing index files
* reconfigures Sphinx
* starts the daemon
* populates the index data (e.g. the generate task)

Given the process failed for you on the last step, you can just run the 
generate task, avoiding further downtime of the daemon. Also, given you’re 
using real-time indices, that’ll always be invoked with Flying Sphinx using the 
Thinking Sphinx rake task: `heroku run rake ts:generate`.

As for processing single indices, this feature was added in v3.4.0, and is done 
via an environment variable:

    INDEX_FILTER=article_core rake ts:generate

But, on the topic of upgrading to v3.4.x - the rake tasks have now been 
unified, and I’ve opted for the original set of task names (historically, for 
SQL indices) to perform all the relevant behaviour for both SQL and real-time 
indices. In development, this means you can just use `ts:rebuild` instead of 
`ts:regenerate`, and `ts:index` instead of `ts:generate`. When it comes to 
mixing with Heroku, then right now it’s probably best using the `flying-sphinx 
regenerate` command and `ts:rt:index` task respectively.

That said, the original real-time tasks (regenerate and generate) still exist, 
but are deprecated.

I’ll look into improving the Flying Sphinx docs and integration to make this a 
little more obvious!

—
Pat

> On 28 Nov 2017, at 10:59 am, Francisco Trindade <franci...@yourgrocer.com.au 
> <mailto:franci...@yourgrocer.com.au>> wrote:
> 
> Hi all,
> 
> 
> we currently run a daily task to process our indices (heroku run bundle exec 
> flying-sphinx index).
> 
> 
> Since we have changed a index, last night we had to run a regenerate task to 
> generate them again (heroku run bundle exec flying-sphinx regenerate). 
> However, midway through the regeneration the process failed because one of 
> the objects being indexed had invalid data, which means one of our indices is 
> not complete.
> 
> My question is if I need to regenerate the indices again since the last task 
> didn't complete, or if we just process the index that failed and that will be 
> fine. If regenerate is necessary, is there a way to regenerate a single index 
> without stopping the sphinx server?
> 
> Thanks
> Francisco
> 
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to thinking-sphinx+unsubscr...@googlegroups.com 
> <mailto:thinking-sphinx+unsubscr...@googlegroups.com>.
> To post to this group, send email to thinking-sphinx@googlegroups.com 
> <mailto:thinking-sphinx@googlegroups.com>.
> Visit this group at https://groups.google.com/group/thinking-sphinx 
> <https://groups.google.com/group/thinking-sphinx>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to thinking-sphinx+unsubscr...@googlegroups.com.
To post to this group, send email to thinking-sphinx@googlegroups.com.
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to