How to index List<Class> in riak so that it will available for solr

Fred Dushin fdushin at
Fri Apr 22 10:07:57 EDT 2016

Hi Anil,

Thanks for your question.

Riak uses the HTTP interface for inserting data into Solr, not Solrj.  We do not therefore support indexing POJOs -- they must be translated to a form that is consumable by the HTTP interface (internally we use JSON, but Riak natively supports several structured data formats).

You can write your own extractors [1] for transforming opaque data structures into structured data, but these are written in Erlang executed in the Riak/Erlang abstract machine (BEAM).  It would likely pose a technical challenge to write a POJO extractor in Erlang, and you might be better off doing this outside of the BEAM, say, in Java, using reflection or some tool that translates Java objects to structured data (XML/JSON).  JAX-B comes to mind as one potential avenue, though that requires a fairly heavy investment in XML-schema, code generation, and so forth, though the Java world is pretty rich with tools for managing all of that.

I hope that answers your question.



> On Apr 22, 2016, at 1:48 AM, Anil Chandgude(HO) <anil.chandgude at> wrote:
> Hi all,
>     We use    *_s for String type, *_i for Integers and so on for single value fields.
> *_ss for List<String>, *_ls for List<Long> nd so on.
> Now I have condition where I want to store List of class like this List<SampleClass> . How to do this ?
> _______________________________________________
> riak-users mailing list
> riak-users at

More information about the riak-users mailing list