Hi Otto

> I will propably make a config file in my app or some temporary
> variable which will contain 10 keys which I get with a map/reduce than
> is run daily, and then I'll fetch the predefined set from Riak when I
> need the "10 first results". Although this will require 10 requests to
> get 10 results, search would have been ideal since one request can
> return a big set of results..
>
> It is a pitty the search feature does not support "q=*" as query.
>

There are reasons for why this is not implemented in Riak Search.  For one,
it would be massively expensive as it requires iterating through all
inverted indexes on a covering set of partitions and building up the entire
list of matching keys (i.e. all keys) in memory on the coordinating node.

The solution which will replace Riak Search, Yokozuna [1], can perform this
operation just fine.  But you will need to store the fields if you wish to
get their values back in the query result, otherwise you still need 11
operations, 1 for the query, 10 to get the values (or use map/reduce as a
multiget).

However, since there is nothing to score on, your 10 results are
effectively random (or perhaps it would fall back to index order).  So I'm
not sure I follow you when you say "10 first results".  What is "frist" in
relation to?

-Z

[1]: https://github.com/basho/yokozuna
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to