aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/configmodel/types/types.sd
blob: bc5b6ed5747054103fbf13388c821e753b21169d (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
search types {

  document types {

    field abyte type byte {
      indexing: summary | attribute
    }

    field along type long {
      indexing: summary | attribute
    }

    field arrayfield type array<int> {
      indexing: attribute
    }

    field setfield type weightedset<string> {
      indexing: attribute
      match {
        token
      }
    }
    field pos type position {
    }

    field setfield2 type weightedset<string> {
      indexing: attribute
      weightedset: remove-if-zero
      weightedset: create-if-nonexistent
      rank-type: identity
      #match {
      #  token
      #}
    }

    field setfield3 type weightedset<string> {
      weightedset: remove-if-zero
      indexing: attribute
      rank-type: identity
      match {
        token
      }
    }

    field setfield4 type weightedset<string> {
      weightedset: create-if-nonexistent
      indexing: attribute
      match {
        token
      }
    }

    field tagfield type tag {
      indexing: attribute | summary
      match {
        token
      }
    }
    struct sct {
      field s1 type string {}
      field s2 type string {}
    }
    field structfield type sct {
    }
    field structarrayfield type array<sct> {
    }
    field stringmapfield type map<string, string> {
        indexing: index | summary
    }
    field intmapfield type map<string, int> {

    }
    field floatmapfield type map<string, float> {

    }
    field longmapfield type map<int, long> {

    }
    field doublemapfield type map<int, double> {

    }
    field arraymapfield type map<string,array<int>> {

    }
    #field complexfield type map<array<sct>, map<int,array<float>>> {
    #}
    #field wildcardfield type map<int,?> {
    #}
    #field wildcardfield2 type map<?,?> {
    #}

    field arrarr type array<array<array<string>>> {}
    field maparr type array<map<string, string>> {}
    field complexarray type array< map<int, array<array<string>>> > {}

    struct mystruct {
      field bytearr type array<byte>{}
      field mymap type map<string, string>{}
      field title type string {}
      field structfield type string {}
    }

    field mystructfield type mystruct {}
    field mystructmap type map<int, mystruct> {}
    field mystructarr type array<mystruct> {}

    struct folder {
      field Version                   type int {}
      field Name                      type string {}
      field FlagsCounter              type map<string,long> {}
      field anotherfolder             type folder {}
    }


    field Folders                   type map<int,folder> {}

    field juletre type long {
      indexing: attribute
      attribute {
        fast-search
      }
    }

    # Field defined same way as tag
    field album0 type weightedset<string> {
      indexing: summary 
      # This is pointless, but
      weightedset {
        create-if-nonexistent
        remove-if-zero
      }
    }

    # Field defined same way as tag    
    field album1 type weightedset<string> {
      indexing: attribute | summary 
      weightedset {
        create-if-nonexistent
        remove-if-zero
      }
    }

  }

  field other type long {
    indexing: input along | attribute 
  }
}