Thanks for the explanation Sean, will look closer at map/reduce.
I'm not sure how well it fits the Riak architecture, but when previously 
working with CouchDB+Lucene, the ability to pass "?include_docs=true" to 
retrieve the original JSON doc was mighty handy.

Best,
Gary




On Saturday, July 14, 2012 at 8:31 AM, Sean Cribbs wrote:

> Hi (what's your name?),
> 
> What a search query returns to you is the "index document", or the result of 
> transforming the input before adding it to the search indexes; this also 
> means that deeply nested fields will be flattened. If you want the original, 
> you can use MapReduce to retrieve the documents resulting from a search query.
> 
> On Fri, Jul 13, 2012 at 8:54 PM, 7zark7 <[email protected] 
> (mailto:[email protected])> wrote:
> > I would like to store JSON documents in a Riak 1.1.x bucket (using 
> > bitcask), and would like to search for them via REST using JSON property 
> > values.
> > 
> > E.g. JSON docs with typed properties like this: 
> > 
> > {
> >    "type": "whatever",
> >    "owner": 123456,
> >    "text": "Blah blah blah",
> >    "enabled": true
> > }
> > 
> > However, the query response (/solr/mybucket/select?q=enabled:true&wt=json) 
> > returns each doc's properties as JSON strings, and not the original JSON 
> > type:
> > 
> > {"responseHeader":{ 
> >     "status":0,
> >     "QTime":1,
> >     "params":{
> >         "q":"enabled:true",
> >         "q.op":"or",
> >         "filter":"",
> >         "wt":"json"
> >     }
> > },"response":{
> >     "numFound":1,
> >     "start":0,
> >     "maxScore":"0.353553",
> >     "docs":[
> >         {
> >             "id":"Obdoy3XbJe3kdh1T2bfxJgISCCL",
> >             "index":"rest",
> >             "fields":{
> >     "enabled": "true",
> >     "owner": "123456",
> >     "text": "Blah blah blah",
> >                 "type": "whatever"
> >             },
> >             "props":{}
> >         }
> >     ]
> > }}
> > 
> > 
> > This makes the results unusable for me, and I'm concerned I'd have to fall 
> > back to N calls back to retrieve each original doc, which is not feasible. 
> > 
> > 
> > I'm used to CouchDB+Lucene which behaves "correctly" to me.
> > 
> > Is there some way to do what I'd like?  E.g. another query method or option?
> > 
> > Thanks
> > 
> > 
> > 
> > _______________________________________________
> > riak-users mailing list
> > [email protected] (mailto:[email protected])
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> > 
> 
> 
> 
> -- 
> Sean Cribbs <[email protected] (mailto:[email protected])>
> Software Engineer
> Basho Technologies, Inc.
> http://basho.com/
> 

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to