We have two requirements:

1. Indexing and storing event id and its timestamp.
2. Indexing and storing custom field name and value. The fields can be of
any type, but for now lets say they are of types string, date and number.

The events and custom fields for any solr document can easily be in
hundreds.

We are looking at two different approaches to handle these scenarios:

1. *Dynamic fields* - Have the fields name start with a particular pattern
like for string, the pattern could be like str_* and for event could be
eventid_*
2. *Parent/child fields* - This seems to be an overkill for our use case
since it's more for hierarchical data. Also, the parent and all its
children need to be reindexed on update which defeats the purpose - we are
now reindexing multiple docs instead of one with dynamic fields. But it
allows us to store custom field name along with its value unlike dynamic
fields where we will have to map user supplied custom field to some other
name based on type.

Has anyone handled similar scenarios with Solr? If so, which approach would
you recommend based on your experience?

We are using solr 6.6

Thanks,
Saurabh

Reply via email to