Leif,

I quickly wrote up a gist to show how you can use a custom schema with your
index and associate it with multiple buckets. Be warned that the current
version of Riak/Yokozuna uses bucket properties for storing the index
association. These are stored in the ring and have a known limitation. The
next version (0.12.0) will use a much more efficient mechanism for storing
association but will also change some of the steps outlined in that gist.
The Yokozuna API is still a bit of a moving target leading up to the Riak
2.0 Final release.

https://gist.github.com/rzezeski/7488192

-Z


On Fri, Nov 15, 2013 at 7:11 AM, Leif Gensert <[email protected]> wrote:

> Hello everyone,
>
> I am currently evaluating Riak for a project of ours.
>
> Here are the requirements in a nutshell:
>
> - We get various customer data as json with different field names (let’s
> just pretend that we have books).
> - We need to store these data as it comes (JSON with the original field
> names).
> - We need to have a consistent search index with fields specified by us.
>
> Example:
>
> Customer A:
>
> {
>   book_title: ‘Alice in wonderland’,
>   num_of_pages: 314,
> }
>
> Customer B:
>
> {
>   book_name: ’Sherlock Holmes in the Hound of the Baskervilles’,
>   number_of_pages: 164,
> }
>
> So far so good.
>
> This data need to be stored for example like this:
>
> {
>   title: ‘Alice in wonderland’,
>   pages: 314,
> }
> {
>   title: ’Sherlock Holmes in the Hound of the Baskervilles’,
>   pages: 164,
> }
>
> My thought was this:
>
> - Store data from each customer to a different bucket.
> - Index the data from the document to Yokozuna (after all, Solr has a
> schema so we could utilize that)
>
> My question concerning this would be:
>
> What’s the best way to do this?
>
> So far the only tutorials I found concerning Yokozuna index the documents
> without a schema.
>
> best
> Leif
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to