Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2012 at 14:59 UTC
Updated:
7 Dec 2014 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jackbravo commentedThere is a bug drush_search_api_index function. When having two indexes, the limit for the second index is the same as the limit for the first index. So you can have 34 items to index on the first one and none on the first, but it will try to index also 34 items on the second index.
Also, and I think this is related to #1823910: Drush sapi-i: "Couldn't create a batch, please check the batch_size and limit parameters.", the module tries to create a batch process even when there are no items to process, which results in an error.
Here is a patch that defines a $index_limit variable that gets set for every index, instead of relying on the $limit variable which doesn't work when running for multiple indexes.
Comment #2
fagoThanks. The patch fixes the number of items that should be index, however search api still hangs when it tries to start indexing the second index for me; i.e. it does not start indexing the second index.
Comment #3
cyberwolf commentedI reworked the patch quite a bit:
Comment #4
cyberwolf commentedComment #5
Anonymous (not verified) commentedthanks! patch #3 works for me with 4 indexes enabled.
Comment #6
isolate commentedPatch #3 works!
Comment #7
drunken monkeyThanks a lot for reworking the patch! It looks great, and if others say it works, too, then even better. ;)
Committed.
Thanks again!
I just fixed a few comments before committing, one issue I had was this:
In type hinting in doc blocks, you should use
bool, notboolean(see here).