blob: a8c801b14212be7a779e25fed5243ccdc1c764f5 (
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
|
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# An entry-level configuration.
# You can get a reasonable configuration by only configuring
# a document
# ...this has become less and less simple over time actually
schema simple {
document simple {
field title type string {
indexing: summary | index
index: prefix
rank-type: identity
rank-type default: about
alias: analias.totitle
alias default: analias.todefault
alias: aliaz
}
field description type string {
indexing: summary | index
summary: full
summary dyndesc: dynamic
rank-type: about
rank-type default: tags
alias: hallo
}
field longdesc type string {
indexing: summary
summary: full
summary longstat: full
summary dynlong: dynamic
summary dyndesc2: dynamic
}
field chatter type string {
indexing: index
rank-type: about
}
field category type string {
indexing: index
rank-type: tags
stemming: none
normalizing: none
}
field popularity type int {
indexing: attribute
}
field measurement type int {
indexing: attribute | summary
rank-type: empty
}
field smallattribute type array<byte> {
indexing: attribute
}
field access type byte { indexing: attribute }
field categories_src type string {
}
field categoriesagain_src type string {
}
field exactemento_src type string {
}
}
field categories type string {
indexing: input categories_src | lowercase | normalize | index
}
field categoriesagain type string {
indexing {
input categoriesagain_src | lowercase | normalize | index
}
}
field exactemento type string { indexing {
input exactemento_src | lowercase | index | summary;
}}
field category_arr type array<string> {
indexing: input category | split ";" | attribute
}
field measurement_arr type array<int> {
indexing: input measurement | to_array | attribute
}
# Some experimental ranking changes
rank-profile experimental inherits default {
rank-type measurement: identity
}
rank-profile other inherits experimental {
rank-type measurement: identity
}
# check inheritance of phase expressions
rank-profile parent inherits default {
first-phase {
keep-rank-count:200
rank-score-drop-limit: -13.0
expression: attribute(popularity)
}
second-phase {
rerank-count: 99
}
function openTicket() {
expression: if(attribute(status) == "accepted",1, if(attribute(status) == "new",1,if(attribute(status) == "reopened",1,0)))
}
}
rank-profile child inherits parent {
second-phase {
expression: attribute(access)
}
}
# A field defined outside an index
field exact type string {
indexing: input title . " " . input category | summary | index
summary-to: default
stemming: none
normalizing: none
rank-type: identity
}
field popsiness type int {
indexing: input popularity * input measurement | attribute
}
}
|