riaksearch: using index docs in place of real objects

Mathias Meyer mathias at basho.com
Thu May 26 15:59:25 EDT 2011


That is correct, Greg. It's either determined by the key used to store the object in Riak KV (given the precommit hook is used), or by a key specified when indexing directly into Riak Search, using e.g. the Solr or the Erlang API. There'll always be a key required, and that'll be used to look up the serialized document in Riak KV.

Mathias Meyer
Developer Advocate, Basho Technologies


On Donnerstag, 26. Mai 2011 at 21:56, Greg Pascale wrote:

> Eric, I believe the key is the document id, which will be the same as the key of the corresponding object in <bucket>.
> 
> -Greg
> 
> On Thu, May 26, 2011 at 12:41 PM, Eric Moritz <eric at themoritzfamily.com (mailto:eric at themoritzfamily.com)> wrote:
> > Out of curiosity what is the key in this URL?
> > http://riak.host:8098/riak/_rsid_<bucket>/key
> > 
> > On Thu, May 26, 2011 at 9:42 AM, Mathias Meyer <mathias at basho.com (mailto:mathias at basho.com)> wrote:
> > > Greg,
> > > 
> > > Riak Search stores indexed documents in Riak KV too, as serialized Erlang terms. You can easily verify that by requesting a document from http://riak.host:8098/riak/_rsid_<bucket>/key.
> > > 
> > > So whenever you query something through the Solr interface the documents you get back are fetched from these buckets, and therefore the same distribution and consistency properties apply to them as to objects stored directly in Riak KV. Bottom line is there's nothing wrong with just using them instead of fetching them again from Riak KV.
> > > 
> > > Mathias Meyer
> > > Developer Advocate, Basho Technologies
> > > 
> > > 
> > > On Mittwoch, 25. Mai 2011 at 00:34, Greg Pascale wrote:
> > > 
> > > > Hi,
> > > > 
> > > > In our data model, our riak objects are flat JSON objects, and thus their corresponding index documents are nearly identical - the only difference is that a few fields which are ints in the riak objects are strings in the index doc.
> > > > 
> > > > Since they are so similar, we are directly using the index docs returned from our search call, skipping the second step of doing gets on the returned keys to retrieve the real objects.
> > > > 
> > > > Is this advisable? Are there any circumstances under which we might run into consistency issues?
> > > > 
> > > > Thanks,
> > > > -Greg
> > > > 
> > > > _______________________________________________
> > > > riak-users mailing list
> > > > riak-users at lists.basho.com (mailto:riak-users at lists.basho.com) (mailto:riak-users at lists.basho.com)
> > > > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > riak-users mailing list
> > > riak-users at lists.basho.com (mailto:riak-users at lists.basho.com)
> > > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> > 
> >  _______________________________________________
> >  riak-users mailing list
> > riak-users at lists.basho.com (mailto:riak-users at lists.basho.com)
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com






More information about the riak-users mailing list