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.

CommentFileSizeAuthor
#2 993834.patch614 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with do_search » do_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.

Anonymous’s picture

Status: Active » Needs review
FileSize
614 bytes

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

Anonymous’s picture

Assigned: Unassigned »
jhodgdon’s picture

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

OK by me. Thanks!

Gábor Hojtsy’s picture

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.