Converting from to an Array and back to a Search object

8 views
Skip to first unread message

DerNalia

unread,
Aug 6, 2010, 1:12:52 PM8/6/10
to Searchlogic
Since I can't do the OR stuff that I need to do, I was wondering if
there is a way to convert a search object to an array, do some array
operations, then convert back to a search object.

I'm looking to do this:

@search =
objects.search('').user_id_equals_any(user_filter).archived_is(nil).visibility_is_any(privacy_filter)
@search = (@search + (objects.visibility_is(Shared::PUBLIC).all -
@search.all)).search('') if show_public


but I get an error when I try to view the page:

undefined method `search' for #<Array:0x106f2de68>
Reply all
Reply to author
Forward
0 new messages