blob: 82741dbe53fc2b79f8ac6ac26ef707157479ee39 (
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
|
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# A search definition of medium complexity
search desktop {
# A document with some fields.
# The fields implicitly defines some indices, summary fields and attributes
document desktop inherits product {
field title type text {
mandatory: true
indexing: summary | attribute | index_text
# index-to: title, default
rank-weight: 300
rank-type: identity
}
field manufacturer type text {
indexing: summary | attribute | index
# index-to: manufacturer, default
alias: producer, brand
rank-type: identity
rank-weight:200
}
field description type text {
indexing: summary | index
rank-type: about
rank-weight: 100
result-transform: dynamicteaser
}
field category type text {
indexing: index
# index-to: category, default
rank-weight: 50
}
field minprice type int {
indexing: summary | attribute | index
index-decimals: 2
rank-type: simple
weight: 30
staticrankbits: 16
}
field someorder type int {
indexing: attribute someorderranking
staticrankbits someorderranking: 32
}
# index_url implicitly defines some fields not contained in the document (contexts)
# If attributes needs to be set on these, it can be done by explicitly listing
# the fields outside documents (show).
# I think we should maybe allow setting such field attributes inside the parent
# field as well for convenience. Both is shown.
field url type url {
# Should index mean index_url for url type fields?
indexing: summary | index_url
parse-mode: url # Must be default for url types, but shown here anyway
rank-type: link
}
}
field category_arr type array<text> {
indexing: input category | split ";" | attribute category_arr
}
# Overriding some url field setting from rank-type link
field url.host {
weight: 1000
}
# Setting an attribute on a non-field index
# This is redunant, as default is default
index default {
default: true
}
# Optionally specify a desire to use a shared dictionary ("catalogs")
shared-dictionary: normal, title, manufacturer
# Optionally set rank values for all indices
# Default is the name of the default one
# Rank settings from individual fields can be selectively overridden
rankprofile default {
firstocc-boost text: 200
}
# Another rank profile
rankprofile predefinedorder {
dynamicranking: off
attribute: someorder
}
# Some experimental ranking changes
rankprofile experimental inherits default {
firstocc-boost text: 300
}
}
|