Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Drush / Rules
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2020 at 10:01 UTC
Updated:
24 May 2020 at 08:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
volkerk commentedComment #4
ivan616 commentedHey volkerk,
I believe you might just misinterpret the names of functions.
In the comment above resetTracker command, we have this:
* Marks one or all indexes for reindexing without deleting existing data.
This is exactly what it does, with the help of
$index->reindex();
I have just set up the test environment locally to recreate the same scenario.
And with a combination of commands:
drush search-api:reset-tracker
drush sapi-i
> [notice] Successfully indexed 3 items.
> [notice] Message: Successfully indexed 3 items.
drush cr
I managed to re-create indexes and saw the changes in the content in an indexed view.
I hope this helps and cheers,
Ivan
Comment #5
volkerk commentedThank you very much for your reply, I tried running the commands you suggested
unfortunately this does not work for me. The index is not re-indexed. If I use the "Rebuild tracking information" link on the status page of the index, re-indexing works using
drush sapi-i.This is how the status page looks initially:
Comment #6
drunken monkeyThanks for reporting this issue!
Ivan616 is right, though: You’re misinterpreting the command, what it does is clearly documented.
I am fully prepared to admit that the name is misleading, since we later added the “rebuild tracker” functionality you’re looking for, but the command is still correct and definitely cannot just be changed at this point.
Instead, I’m happy to add a new
search-api-rebuild-trackercommand (or similar) that does what you’re asking for. You’re right: this functionality doesn’t seem available yet via Drush.Comment #7
chr.fritschHere is the new drush command
Comment #8
chr.fritschComment #9
drunken monkeyThanks for the patch, looks pretty good!
A few minor nitpicks fixed in the attached revision, please test/review!
Also, though, should we maybe add a confirmation to the command? I.e., user has to enter
ybefore we actually proceed?Should maybe have done this for all the potentially (very) disruptive commands.
Comment #11
drunken monkeyCommitted, and just created #3135187: Add confirmation for disruptive Drush commands? as a follow-up.