blob: bdc90328cdb1371126cf08baa62a0bff3da997e6 (
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
|
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
search pc {
document pc inherits product {
field brand type string {
indexing: index | summary
}
field color type string {
indexing: summary | index
index: prefix
alias: colour
rank: filter
}
field cpuspeed type int {
indexing: summary
}
field location_str type array<string> {
}
}
field location type array<position> {
indexing: input location_str | for_each { to_pos } | attribute
}
rank-profile default {
first-phase {
expression: fieldMatch(brand).completeness + fieldMatch(color).completeness
}
second-phase {
expression: fieldMatch(brand).completeness*fieldMatch(brand).importancy + fieldMatch(color).completeness*fieldMatch(color).importancy
}
summary-features: fieldMatch(title) fieldMatch(brand).proximity match.weight.title nativeFieldMatch(title)
rank-features: attribute(cpuspeed)
rank-properties {
fieldMatch(brand).maxOccurrences : 20
}
}
}
|