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.

Files: 
CommentFileSizeAuthor
#2 993834.patch614 bytesnenne
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 993834.patch.
[ View ]

Comments

Title:Documentation problem with do_searchdo_search return value doc is incorrect
Issue tags:+Novice

Good catch, thanks!
Good project for a doc/patch novice.

Does not apply to D7, as this function doesn't exist in D7.

Status:Active» Needs review
StatusFileSize
new614 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 993834.patch.
[ View ]

Found switching one word out was enough, keeping the return value description simple.

Assigned:Unassigned» nenne

Assigned:nenne» Unassigned
Status:Needs review» Reviewed & tested by the community

OK by me. Thanks!

Status:Reviewed & tested by the community» Fixed

Thank you, committed.

Status:Fixed» Closed (fixed)
Issue tags:-Novice

Automatically closed -- issue fixed for 2 weeks with no activity.