Closed (fixed)
Project:
Search API Database Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2011 at 14:34 UTC
Updated:
24 Nov 2011 at 17:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
drunken monkeyCommitted.
Comment #2
drunken monkeyCommitted the attached one-line follow-up.
Comment #3
pbuyle commented$index->options['fields']is still used inSearchApiDbService::addIndex. I'm not sure if this is ok or not.Weirdly, when using an exported index (via Features) in Simpletest test cases, I get "Unknown field specified as search target." SearchApiExceptions, but when using the same exported index outside my test cases for manual testing, I don't have any issue. Using
$index->getFields()inSearchApiDbService::addIndexsolves the issue.Comment #4
drunken monkeyAh, you're right, thanks! Thought it would be OK there, but there is a small issue – and anyways: better safe than sorry.
However, I don't think that will fix the SimpleTest error, which seems to be a bit weird. Might well be that is just due to a Simpletest-peculiarity – I've run into those before, there seem to be some obscure issues with Form API.
Anyways, patch attached.
Comment #5
drunken monkeyComment #6
tancWorks nicely for me and fixes my problems in #1331506: Watchdog error: No field settings for index with id default_node_index
Comment #7
pbuyle commentedThe patch in #4 only addresses the
$index->options['fields']in theforeach, but before thatoptions['fields']is also used. It is probably ok, but as said: better safe than sorry. The attached patch replace the 3 usages of$index->options['fields']inSearchApiDbService::addIndex.And yes, sadly it doesn't save the Simpletest issues I'm having since #1308638: Reduce size of stored index settings :(
Comment #8
drunken monkeyPlease test the patch in #4, the other use is definitely OK.
Comment #9
drunken monkeyCommitted this, hopefully nothing grave turns up now.