Closed (fixed)
Project:
Search API Database Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Jan 2014 at 00:14 UTC
Updated:
27 Mar 2014 at 17:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drummHere is the patch.
Comment #2
drunken monkeyHm, normally we shouldn't change an existing update hook, but instead provide a new one. Otherwise, people who have already updated won't ever get this change executed. However, in this case I guess it doesn't matter that much, since things will work just the same either way, only maybe a bit slower without the update. And people could just change the index manually if they still want the improvement.
Is this your opinion, too, Neil? Or did you just post the patch as an illustration, but intended a proper patch to be written and committed?
In any case, thanks for pointing out another possibility for a performance improvement!
Any other opinions on this?
Comment #3
drummI'm okay with either way. Since it has been a few weeks since the original commit, it may be better to do a separate update function.
If we do an additional update, we should still roll the change into the exiting update, and make changes the second one only if the indexes aren't set correctly. This will cut down on overall update time.
Comment #4
drunken monkeyOK, makes sense, let's do it that way! Do you know how to check for that, though? I can't seem to find a function that would allow reading the current index definition.
Comment #5
drummYep, looks like there isn't a way to get the current index definition. This patch uses the index name to check.
Comment #6
drunken monkeyLooks great, thanks!
Committed.