Thanks Brian for the response. Yah we r trying to write that Jackson deserialiser for our object and was struck there as we r not much familiar just want to check if there is a direct way. We will either try to share with you or try solr client directly
Thanks Santi On Apr 7, 2015 9:37 PM, "Brian Roach" <[email protected]> wrote: > Santi, > > There is nothing in the Riak Java client to do that, no. > > The result of a search query over the Riak protocol buffers API > returns the fields you queried for as a series of key/value pairs, > with the value always being a string. This is unfortunate when it > comes to mapping those values back to a class (or just serializing > them to JSON) if there was any non-string values (numbers or null). > > The Java client presents a returned document as a Map<String, > List<String>> for this reason, the list being required as there could > be multiple values for a single key. > > That said, it shouldn't be too difficult to write a custom > deserializer for Jackson if you know what the results are going to > look like in advance. If you could show a dump of the Map being > returned by the Riak client we may be able to help with that. Another > option would be to use a Solr client and query Solr directly rather > than going through Riak. > > Thanks, > Brian Roach > > > > > On Tue, Apr 7, 2015 at 8:32 AM, Santi Kumar <[email protected]> wrote: > > Hi > > We have a Composite pojo which we are indexing into Riak search. If I see > > the structure of the object in solr web console, it shows as nested json. > > Through java client when we query it returns the Map and having > difficulties > > in converting it into java object. Is there a way in riak-java client to > > return a pojo instead of Map and we dealing with jakson mappers? > > > > Thanks > > Santi > > > > _______________________________________________ > > riak-users mailing list > > [email protected] > > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
