Is there any way to reliably specify an index within a nested Array (or Map) in Firebase Bolt?
<p>Creating an index on an array is pretty straight forwards:</p>

<pre><code>type Root { level_1: Level_1[]; }
type Level_1 { fieldToBeIndexed: String; }

path / is Root {}
path /level_1 { index() = ["fieldToBeIndexed"]; }
</code></pre>

<p>Giving the following (with validation removed for readability):</p>

<pre><code>{
  "rules": {
    "level_1": {
      "$key1": {
        "fieldToBeIndexed": {}
      },
      ".indexOn": ["fieldToBeIndexed"]
    }
  }
}
</code></pre>

<p>But because an automatically generated key (<code>$key1</code>) is used for the array it means we can't reliably reference any path below it in case changes in the structure (or implementation) cause the key's name to change.</p>

<p>Since it seems indexes can only be defined in <code>path</code> statements does that mean it is not possible to index <code>fieldToBeIndexed</code> in the following scenario?</p>

<pre><code>type Root { level_1: Level_1[]; }
type Level_1 { level_2: Level_2[]; }
type Level_2 { fieldToBeIndexed: String; }

path / is Root {}
</code></pre>

<p>Which translates to:</p>

<pre><code>{
  "rules": {
    "level_1": {
      "$key1": {
        "level_2": {
          "$key2": {
            "fieldToBeIndexed": {}
          }
          // How to get the index here?
        }
      }
    }
  }
}
</code></pre>