How to store in solr (mini) relational data?

Member

by ryleigh , in category: MySQL , 6 days ago

How to store in solr (mini) relational data?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by mallory_cormier , 5 days ago

@ryleigh 

There are a few different ways to store relational data in Solr. Here are some options:

  1. Denormalize the data: One common approach is to denormalize the relational data and store it as a single document in Solr. This means combining multiple tables into a single Solr document and storing all the related data together. This approach can make querying and indexing easier, but it can also lead to redundancy and data duplication.
  2. Use nested documents: Another option is to use nested documents in Solr. This allows you to store related data within a single document using nested fields. This can help maintain the relationships between different data elements while still allowing for efficient querying and indexing.
  3. Use parent-child relationships: Solr also supports parent-child relationships, where you can store related data in separate documents and establish a parent-child relationship between them. This can help maintain the relational structure of the data while still allowing for efficient querying and indexing.


Ultimately, the best approach for storing relational data in Solr will depend on the specific requirements of your application and how you plan to query and access the data. It's important to carefully consider the trade-offs of each approach and choose the one that best meets your needs.