Modeling data to support nested queries

Hi,

I noticed that App Search does not support nested object types (Schema Design). What data model would you suggest in order to support the data model and query given below?

e.g. my data model is:

course (1) -- (*) section

section properties:

  • campus
  • semester

I would like the query to return all courses containing a section offered in Summer 2019 (semester) at the Loyalist campus

Hi @omairkhawaja

Let's say the course Math 1 is offered in

  • Summer 2019, Loyalist campus and
  • Winter 2020, Bancroft campus

You could index this data as 2 documents

  • (Math 1, Summer 2019, Loyalist campus)
  • (Math 1, Winter 2020, Bancroft campus)

so the Schema becomes:

  • all course properties (flattened)
  • campus
  • semester

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