summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/search.rnc
blob: cd02c40520615eae914980f3dc011276a73504d2 (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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

include "searchchains.rnc"
include "container.rnc"

Search = element search {
   attribute version { "2.0" } &
   GenericConfig* &
   SearchDefinitions? &
   SCluster*
}

ModeStreaming = attribute indexingmode { string "streaming" | string "STREAMING" } &
                attribute storagecluster { xsd:NCName }

QRServerOptionsElems =
   element cacheoptions {
      attribute cluster { list { xsd:NCName+ } }? &
      ## Size in megabytes
      element size { xsd:nonNegativeInteger }?
   }* &
   element resultlimits {
      attribute maxhits { xsd:nonNegativeInteger }? &
      attribute maxoffset { xsd:nonNegativeInteger }? &
      attribute maxgroups { xsd:nonNegativeInteger }?
   }? &
   element accesslog { string "queryaccesslog" | string "yapacheaccesslog" | string "disabled" }?

SearchDefinitions = element searchdefinitions {
   element searchdefinition {
      attribute name { text }
   }+
}

TopLevelDispatchers = element topleveldispatchers {
   element topleveldispatcher {
      attribute preferlocalrow { text }? &
      service.attlist &
      GenericConfig*
   }+ &
   GenericConfig*
}

ModeRealTime = attribute indexingmode { string "realtime" | string "REALTIME" }

ClusterCommon = attribute name { xsd:NCName }? &
   GenericConfig* &
   ( ModeRealTime | ModeStreaming )? &
   # TODO: Rename?
   element visibilitydelay { xsd:double { minInclusive = "0.0" } }? &
   element querytimeout { xsd:double { minInclusive = "0.0" } }? &
   SearchDefinitions


Indexing = element indexing {
   attribute indexingclustername { text }? &
   attribute chain { text }? &
   #Below element is deprecated and has no effect:
   element documentprocessors {
      DocumentProcessorV3+
   }?
}

SCluster = element cluster {
   # name defaults to 'search'
   ClusterCommon &
   attribute minnodespercolumn { xsd:nonNegativeInteger }? &
   Indexing? &
   element documents {
      attribute feedname { text }?,
      # TODO: check if 'true' works for getting all, and disallow empty in selection language.
      attribute selection { text }?
   }? &
   # TODO: remove in the future...
   element resultlimits {
      attribute maxhits { xsd:nonNegativeInteger }? &
      attribute maxoffset { xsd:nonNegativeInteger }?
   }? &
   element oos {
      attribute auto { xsd:boolean } &
      attribute timeout { xsd:nonNegativeInteger }? &
      attribute min-in-service-per-column { xsd:positiveInteger }?
   }? &
   # Default is that one clustercontroller is created on a qrserver node in javacode
   element clustercontrollers {
      element clustercontroller { service.attlist & GenericConfig* }+
   }? &
   # Defaults is that two topleveldispatchers are created (one each on different
   # qrserver nodes, only one created if one qrserver node specified) in javacode
   TopLevelDispatchers? &
   element row {
      GenericConfig* &
      (attribute index { xsd:nonNegativeInteger },
      element searchnodes {
         element searchnode {
            service.attlist &
            GenericConfig* &
            attribute index { xsd:nonNegativeInteger } &
            attribute engine { text }?
         }+
      })
   }* &
   Tuning?
}

Tuning = element tuning {
   element dispatch {
      element max-hits-per-partition { xsd:nonNegativeInteger }?
   }? &
   element searchnode {
      element requestthreads {
         element search { xsd:nonNegativeInteger }? &
         element persearch { xsd:nonNegativeInteger }? &
         element summary { xsd:nonNegativeInteger }?
      }? &
      element flushstrategy {
         element native {
            element total {
               element maxmemorygain { xsd:nonNegativeInteger }? &
               element diskbloatfactor { xsd:double { minInclusive = "0.0" } }?
            }? &
            element component {
               element maxmemorygain { xsd:nonNegativeInteger }? &
               element diskbloatfactor { xsd:double { minInclusive = "0.0" } }? &
               element maxage { xsd:nonNegativeInteger }?
            }? &
            element transactionlog {
               element maxentries { xsd:nonNegativeInteger }? &
               element maxsize { xsd:nonNegativeInteger }?
            }? &
            element conservative {
               element memory-limit-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }? &
               element disk-limit-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }?
            }?
         }?
      }? &
      element resizing {
         element initialdocumentcount { xsd:nonNegativeInteger }?
      }? &
      element index {
         element io {
            element write { TuningIoOptionsLight }? &
            element read { TuningIoOptionsLight }? &
            element search { TuningIoOptionsFull }?
         }
      }? &
      element attribute {
         element io {
            element write { TuningIoOptionsLight }?
         }
      }? &
      element summary {
         element io {
            element write { TuningIoOptionsLight }? &
            element read { TuningIoOptionsFull }?
         }? &
         element store {
            element cache {
               element maxsize { xsd:nonNegativeInteger }? &
               element initialentries { xsd:nonNegativeInteger }? &
               element maxentries { xsd:nonNegativeInteger }? &
               TuningCompression?
            }? &
            element logstore {
               element maxfilesize { xsd:nonNegativeInteger }? &
               element maxdiskbloatfactor { xsd:double { minInclusive = "0.0" } }? &
               element minfilesizefactor { xsd:double { minInclusive = "0.10" maxInclusive = "1.0" } }? &
               element chunk {
                  element maxsize { xsd:nonNegativeInteger }? &
                  element maxentries { xsd:nonNegativeInteger }? &
                  TuningCompression?
               }?
            }?
         }?
      }? &
      element initialize {
         element threads { xsd:nonNegativeInteger }?
      }?
   }?
}

TuningIoOptionsLight = string "normal" | string "directio"
TuningIoOptionsFull = string "normal" | string "directio" | string "mmap" | string "mlock"

TuningCompression = element compression {
   element type { string "none" | string "lz4" }? &
   element level { xsd:nonNegativeInteger }?
}