aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/map_of_struct_attribute/test.sd
blob: 7806d49392eb83cf48737616145933ba4252180e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema test {
  document test {
    struct elem {
      field name type string {}
      field weight type int {}
    }
    field str_elem_map type map<string,elem> {
      indexing: summary
      struct-field key {
        indexing: attribute
        attribute: fast-search
      }
      struct-field value.name {
        indexing: attribute
      }
      struct-field value.weight {
        indexing: attribute
      }
    }
    field int_elem_map type map<int,elem> {
      indexing: summary
      struct-field key {
        indexing: attribute
      }
      struct-field value.name {
        indexing: attribute
        attribute: fast-search
      }
    }
  }
}