Hi Artem, This is expected behavior. There are two things at work here:
* When you store a JSON document with a hierarchy of data, the system needs to flatten the object into fields before it can be indexed, and any fields with the same name are concatenated. * When you query through the Solr interface, the response needs to be a valid Solr response, which means that the system is limited to returning a flat structure. If your goal is to run a query that returns your original documents with the hierarchy preserved, you might want to look into querying through the Riak client. Currently, the Python, PHP, and Erlang clients allow you to run a search from within the client and retrieve a list of bucket/keys (or, alternatively, to kick off a map/reduce operation). We plan to add support to the rest of the clients in the future. Hope that helps! Best, Rusty , and then those fields are indexed. By default, we concatenate levels of the hierarchy with underscores. At retrieval time, if you are querying via Solr then we need to respect the already established Solr interface, which assumes a On Thu, Dec 9, 2010 at 3:37 PM, Artem Golovinsky <artemgolovin...@gmail.com>wrote: > Hi all, > > I have question about Riak Search schema again. Schema - > http://pastebin.com/0Khh29ku > > I make query to find object via solr I get following - > http://pastebin.com/bY0Dg1Wn > > Please look at fields: > > > 1. "known_entities_count": "1 3 1 1", > 2. "known_entities_relevance": "0.858842 0.758043 0.452989 0.427038", > 3. "known_entities_text": "mobile phone Twitter Britain API", > 4. "known_entities_type": "FieldTerminology Company Country Technology" > , > > > But when I try to get this object via > http://localhost:8098/riak/feeds6/017925890e696568f4447b1ad720fa0c, I get > normal object in format which was stored in Riak - > http://pastebin.com/Yjh2ZPPK. > > > > - > known_entities: [ > > - - > { > - relevance: "0.858842" > - count: "1" > - type: "FieldTerminology" > - text: "mobile phone" > } > - - > { > - relevance: "0.758043" > - count: "3" > - type: "Company" > - text: "Twitter" > } > - - > { > - relevance: "0.452989" > - count: "1" > - type: "Country" > - text: "Britain" > } > - - > { > - relevance: "0.427038" > - count: "1" > - type: "Technology" > - text: "API" > } > > ] > > > All section in "known_entities" are separated. > > How can I get object in this format via solr in Riak Search? Or is it > feature of Riak Search? > > Thanks in advance! > -- > Best regards, > Artem Golovinsky > > _______________________________________________ > 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