質問

I have three buckets, call them A, B, and C. Each bucket has some contents with the same structure, that has been index in Riak Search. For simplicity, let's pretend there's an email address and a password.

I want to create a Riak Search or Map/Reduce (if necessary) that spans across all 3 buckets. But nothing I try works. Riak Search has a format without an index (bucket?), but requires the index to specified in the parameters or it always returns 0 records.

Map/Reduces as described here, shows the "inputs" field to take an array, but you cannot supply an array of bucket/query pairs to run the search, only Bucket/Key pairs.

It seems like this should be possible, but I cannot see how.

Thanks.

役に立ちましたか?

解決

In Riak 2.x, it is possible to assign an index to more than one bucket. It suits well your use case since structure of the contents is the same for all of your buckets (and hence they fit into the same Solr schema). Searching the index will return results from all buckets associated with it, which is what you need. You still know which bucket each record comes from - use location data returned in search results (type, bucket, key).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top