0

I have is this:

public class Product {

    @Field("object_id")
    private String objectId;

    private List<MyObject> listOfMyObjects;

}

I use SolrJ to save the info. How can I make listOfMyObjects look like list of nested documents in Solr response. I can make the field multivalued, but I need the list to be list of documents.

I can see that this question is asked few times(e.g. Solrj Block Join Bean support ) but no answer. Solr supports nested documents, but how to make it happen using SolrJ with annotations and schema.xml.

Community
  • 1
  • 1
Mihkel L.
  • 1,543
  • 1
  • 27
  • 42
  • Yeah they are POJO's. They have getters/setters, just left them out for simplicity. – Mihkel L. Oct 13 '15 at 10:47
  • 1
    Take a look at this: https://issues.apache.org/jira/browse/SOLR-1945 There's a workaround halfway the page that could be helpful. Support for child docs in DocumentObjectBinder was added as of version 5.1 – Richard Osseweyer Oct 14 '15 at 15:06

0 Answers0