Skip to main content

Hi all,

I have a question regarding the use of nested attributes from linked objects when defining indexes.

In my model, I have an object Cement that has a direct link to another object called ScenarioContent.

I would like to use the attribute ScenarioContent.Type as part of the index on the Cement object.

This is particularly useful, because I use views that filter Cement instances based on ScenarioContent.Type.
 For example, to expose only planned scenarios, I use the following rawFilter in a view:

@view(
  rawFilter: {
    nested: {
      scope: Â"Cement", "ScenarioContent"]
      filter: {
        equals: {
          property: {"ScenarioContent", "Type"]
          value: "PLANNED"
        }
      }
    }
  }
)

 

Question:

Can I use this nested attribute (ScenarioContent.Type) in the index definition of Cement?

If this is not currently supported, is there a recommended alternative to support performant queries on this kind of filter?

Hello,

I have a new question in the same context,
Q: This kind of filter applied on model, are represented in depth by a materialized views (like Postgres DB) or not?

if it’s a materialized view, i think there is no need of indexes and we get the data without any on-the-fly calculation


Sorry for the late response, ​@Oussama ALLALI I checked with the engineering team, Indexes can only include properties in a single container. ​@Mohamed FERJANI there is no materialized views in DM at this time.

If you have any further questions please let me know.


Reply