When using drush, it's not possible to index nodes.
See below:

$ drush search-api-index
Indexing a maximum number of 0 items (50 items per batch run) for the index Default node index.                                                                                                                                                                    [ok]
Couldn't create a batch, please check the batch size and limit parameters.                                                                                                                                                                                         [error]
Indexing a maximum number of 0 items (50 items per batch run) for the index Ad search.                                                                                                                                                                            [ok]
Couldn't create a batch, please check the batch size and limit parameters.    

$ drush search-api-status
 Id  Index               % Complete  Indexed  Total 
 1   Default node index  -           0        0     
 2   Ad search          100%        41       41   

It works from UI.

Related?
#1225620: Use the Batch API for the "Index now" functionality

CommentFileSizeAuthor
#1 1879102-sapi-drush-empty-batch.patch649 bytesfearlsgroove

Comments

kenorb’s picture

Issue summary: View changes

...

fearlsgroove’s picture

Status: Active » Needs review
StatusFileSize
new649 bytes

It's a small flaw in the drush logic. Needs to bail to the next index if there's nothing to index instead of starting to create an empty batch. Quickie patch attached.

drunken monkey’s picture

Status: Needs review » Fixed

Committed. Thanks for your contribution!

kenorb’s picture

Great, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added sentence