Types design question (parent child, effciency)

Hi people,

i need to design index of elements that has kind of parent child structure...
Here an example

"name": "bla",
"id": "11234",
"subelements_count": "3",
"subelement": [
{"id": "221", "name": "Sub1", "result": "OK" },
{"id": "222", "name": "Sub2", "result": "FAILURE" }

root element has a list of subelements object, lets imagine that this is representing some eventslog for root element. I ask mysefl how to design such index with type (or several types) to allow efficien search queries by root element status, where status is in fact reperesented by some constelation of statuses in subelements

Here some typical queries:

Find all root elements that

  1. are in state FAUILURE: At least one subelement with result: "FAILURE"
  2. are in PROGRESS: None subelement with "FAILURE"
  3. are in SUCCESS: Only subelements with status "OK"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.