aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/map_of_struct_attribute/test.sd
blob: 2e71678148b2e223a50284761e89d4e14f2e9503 (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
33
34
35
36
# 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
      }
    }
  }
  document-summary rename {
    summary new_str_elem_map type map<string,elem> { source: str_elem_map }
    summary new_int_elem_map type map<int,elem> { source: int_elem_map }
  }
}