0

I have an application where I am using spring datasolr to save data. Now I have an object PhoneDocument that has lot of fields: String, boolean. They are getting properly saved in solr. Even Collection is getting properly saved in solr.

How ever if I use an object like SimDocument in PhoneDocument, data form SimDocument is not saved in solr.

Before posting my code I wanted to know if its even possible to have a scenario where your Document has a custom object and when you save the Document(PhoneDocument) the data that was stored in the custom object(SimDocument) will be saved as well

Christoph Strobl
  • 6,491
  • 25
  • 33
sachin jain
  • 224
  • 1
  • 4
  • 16

1 Answers1

0

Solr does not support nested structures. This means you'll have to flatten data in a way that fits the index.

You can register your own Converter as @ReadingConverter and/or @WritingConverter for the custom types you have (see: Mapping Solr Converter showing the configuration and CustomConversionsTests for Converter samples).

Christoph Strobl
  • 6,491
  • 25
  • 33