Short answer to 'should I use the same search index across all CRDT buckets': Probably not.
Long answer: It depends of what you're going to be storing in your CRDT buckets. And what you want to query on. If your buckets store objects that have fields in common (for example, all your CRDTs have a field 'user_id_register'), and you want to query on those few fields, then sure, create a custom schema for those fields, and use the same index across the buckets. I'm going to guess that this is not what you intend, though. You're probably thinking of either using the default schema (btw - DON'T use the default schema in production. It not only indexes -every field- in a document, but also -stores the value- for those fields, which is a lot slower and wastes a lot more space.), or are going to be using a custom schema with some dynamic fields. Something like - index all fields that end in *_register, that sort of thing. Again, that's a bad idea. In relational database terms, this is like creating an index on all columns of all tables. It gets expensive very fast. So, in short: 1) Don't use the default schema for your indexes in production. It's only meant as a developer convenience, while you're learning Solr. 2) Use custom schemas instead, and only index those fields that you'll be querying. So, unless all your CRDTs have common fields, this means creating separate custom indexes for your buckets. On Fri, Nov 20, 2015 at 10:36 PM, Weixi Yen <we...@spacechatapp.com> wrote: > Hello, > > I have a question about Riak 2.0+ Search best practices. > > A) I'm wondering if using the same search index on all my CRDT bucket > types and then filtering by bucket name is a good idea. > > B) Or should I be creating different indexes for each bucket if my primary > goal is to search by bucket. > > Are there potentially huge performance issues when going with Option A? > > Thanks! > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > >
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com