The documentation states
"Return value
An array of SIDs for the search results."
This is technically incorrect. The return value is not an array of 'SIDs', it is actually an array of objects who have member variable called 'sid'. I only discovered this by calling var_dump() on the return value of do_search().
Some notes on actually using the return value would be helpful. It is not clear that the 'sid' member variable of an object in the list is actually a node ID. Infact, nothing at all is stated about what the 'sid' is, and I was on a wild goose chase thinking that I needed to convert a 'sid' into a 'nid' by reading the search_node_links table. This clearly not the case.
Comment | File | Size | Author |
---|---|---|---|
#2 | 993834.patch | 614 bytes | Anonymous (not verified) |
Comments
Comment #1
jhodgdonGood catch, thanks!
Good project for a doc/patch novice.
Does not apply to D7, as this function doesn't exist in D7.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedFound switching one word out was enough, keeping the return value description simple.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #4
jhodgdonOK by me. Thanks!
Comment #5
Gábor HojtsyThank you, committed.