The general rule is to flatten the structures. You have a choice between
sharing common fields between tables, such as "title", or adding a
prefix/suffix to qualify them, such as "document_title" vs. "product_title".
You also have the choice of storing different tables in separate Solr
cores/collections, but then you have the burden of querying them separately
and coordinating the separate results on your own. It all depends on your
application.
A lot hinges on:
1. How do you want to search the data?
2. How do you want to access the fields once the Solr documents have been
identified by a query - such as fields to retrieve, "join", etc.
So, once the data is indexed, what are your requirements for accessing the
data? E.g., some sample pseudo-queries and the fields you want to access.
-- Jack Krupansky
-----Original Message-----
From: Thomas Gravel
Sent: Wednesday, August 01, 2012 9:52 AM
To: solr-user@lucene.apache.org
Subject: Map Complex Datastructure with Solr
Hi,
how can I map these complex Datastructure in Solr?
Document
- Groups
- Group_ID
- Group_Name
- .....
- Title
- Chapter
- Chapter_Title
- Chapter_Content
Or
Product
- Groups
- Group_ID
- Group_Name
- .....
- Title
- Articles
- Artilce_ID
- Artilce_Color
- Artilce_Size
Thanks for ideas....