Skip to content

Commit

Permalink
Possibly fix Riak search functions
Browse files Browse the repository at this point in the history
Thanks to Rubén GO
  • Loading branch information
Evan Miller committed May 28, 2012
1 parent f79fe31 commit 1718e9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/db_adapters/boss_db_adapter_riak.erl
Expand Up @@ -59,7 +59,8 @@ find(Conn, Type, Conditions, Max, Skip, Sort, SortOrder) ->
[] ->
riakc_pb_socket:list_keys(Conn, Bucket);
_ ->
riakc_pb_socket:search(Conn, Bucket, build_search_query(Conditions))
{ok, KeysExt} = riakc_pb_socket:search(Conn, Bucket, build_search_query(Conditions)),
{ok, lists:map(fun ([_,X])-> X end, KeysExt)}
end,
Records = find_acc(Conn, atom_to_list(Type) ++ "-", Keys, []),
Sorted = if
Expand Down

1 comment on commit 1718e9d

@jasonjackson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still doesn't work for me, search against my riak cluster yields an empty set:

(examples@boss01)1> boss_db:find(greeting, []).    
[{greeting,"greeting-HwKnJLSbw7garGqOkbe3KlgiuxB",
           "Boss says Hello!"},
 {greeting,"greeting-R8OlBuFM7eYuyiAYsLloDIJs8oX",
           "Try again"}]
(examples@boss01)2>    
(examples@boss01)2>  boss_db:find(greeting, [{greeting_text, 'equals', "Try again"}]).
[]
(examples@boss01)3> 

Please sign in to comment.