summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/arrays/arrays.sd
blob: e895896b980ff5f03a389d6fedf32701b19a23ec (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
37
38
39
40
41
42
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema arrays {

  document arrays {

    field tags type array<string> {
      indexing: summary | index
    }

    field ratings type int[] {
      indexing: summary | index
    }

    field a type string {
      indexing: index
    }

    field b type array<string> {
      indexing: index  | attribute
    }

    field c type weightedset<string> {
      indexing: summary | index
    }

  }

  field mycnt type int {
      indexing {
          0 | set_var chunk_cnt;
          input b | for_each {
              get_var chunk_cnt + 1 | set_var chunk_cnt
          };
          get_var chunk_cnt | attribute;
      }
  }

  fieldset default {
      fields: a, b, c
  }

}