Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yokozuna and Bucket Types #176

Closed
rzezeski opened this issue Sep 20, 2013 · 3 comments
Closed

Yokozuna and Bucket Types #176

rzezeski opened this issue Sep 20, 2013 · 3 comments
Assignees
Milestone

Comments

@rzezeski
Copy link
Contributor

basho/riak#362

Add bucket type support to Yokozuna.

Yokozuna will:

  • Continue to base index association on bucket properties.
  • If the bucket is under the default type then the bucket prop yz_index must be set. This is also the scenario for users migrating from Riak Search.
  • If the bucket has a type with yz_index set then that bucket will inherit that index association.
  • If the bucket has a type with yz_index set but also has yz_index set as a bucket prop then the latter wins. This means buckets under one type can point to different indexes.
  • Multiple buckets can point to one index.
  • A bucket can only have one associated index.
  • When migrating Riak Search indexes keep them under default type as to avoid moving the KV data.
  • Add logic to yz_index:associated_buckets(Index) to understand types. I.e. if a type has yz_index set and has 3 buckets underneath it then those 3 buckets, along with any other buckets pointing to Index, should be returned.
  • Add special field _yz_bt to designate the bucket type of the Solr document.
@ghost ghost assigned rzezeski Sep 24, 2013
@rzezeski
Copy link
Contributor Author

After talking with @jrwest tonight it sounds like get_bucket will handle the property inheritance automatically. I.e. Yokozuna doesn't have to care where the index name comes from. It's up to the user to know that a type property applies to all its buckets but can be overridden by a bucket property.

It sounds like yz_index:associated_buckets could be a problem. Perhaps the best thing to do there is just return any types with yz_index set along with and bucket overrides. E.g.

-spec assocaited(Index) -> [{type, [type_name()]}, {buckets, [bucket_name()]}].

@jrwest
Copy link
Contributor

jrwest commented Sep 27, 2013

one thing I forgot to mention when talking about this earlier is get_bucket can now return {error, no_type} when passed {BucketType, BucketName} and BucketType d.n.e (or is inactive)

@rzezeski
Copy link
Contributor Author

This will rely on basho/riak_kv#711.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants