Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Framework
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2013 at 11:12 UTC
Updated:
21 Jun 2013 at 15:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
drunken monkeyThis should do the trick.
Comment #2
drunken monkeyComment #3
drunken monkeyComment #4
drunken monkeyThis also removes the now unnecessary
|COMPLEX|hack for complex queries. (See #2013609: Change the workflow of the module's tests).Comment #5
drunken monkey(For context: this issue was born in #1863672-14: Multiple content in the search result, when using multiple terms to filtering onwards. Continuing the discussion related to this test module here now.)
It's no hook implementation, no, it's just a custom loading function. However, the Search API usually loads with
entity_load()(since it has to work on a generic level), therefore the changes in that function would only affect the testing module itself, which uses the function in several places.I therefore think it's safe to remove the special keywords code in that place.
Sorry, just figured this out myself, otherwise I wouldn't have asked.
I don't think that's necessary, solving it this way should suffice. I don't think we'll have to add/change properties in the future, or at least only rarely, and doing this would just make the code more complicated (I'd think).
Yes, you're right, let's discuss it in here.
Moving the test module would not be possible, as the Search API tests also heavily rely on it. And though copying would be possible, I think it would lead to unnecessary code duplication. Besides, one of the main reasons (except simple, clean decoupling) for doing this would have been to enable #2013609: Change the workflow of the module's tests to be tested by the test bot and commited right away. However, since it is also blocked by another Search API issue already (which we could work around, but I'd rather fix it cleanly), that's not a valid point anymore.
Comment #6
drunken monkeyRevised patch which also allows
NULLvalues for all fields (except ID).Comment #7
bago commented+1 for me. I see you decided not to use array_filter after the explode (for keywords). Is this intended or you changed your mind since raising that idea in the linked issue? Currently when we put an empty string it's like we have 1 element with an empty value (not sure if this is indexed by the search api or not).
Comment #8
drunken monkeyI moved the
array_filter()to the last line.Comment #9
bago commentedLOL, I must be blind!
I just run the tests succesfully.
Comment #10
drunken monkeyNo problem, thanks for testing!
Committed.