aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-documentgen-plugin/etc/music/music.sd
blob: 8c2d324697c758e089a02fd72e086357f4b54bc6 (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
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# A basic search definition - called music, should be saved to music.sd
search music {

  # It contains one document type only - called music as well
  document music {

    field title type string {
      indexing: summary | index   # How this field should be indexed
      weight: 75 # Ranking importancy of this field, used by the built in nativeRank feature
    }

    field artist type string {
      indexing: summary | attribute | index
      weight: 25
    }

    field year type int {
      indexing: summary | attribute
    }

    # Increase query
    field popularity type int {
      indexing: summary | attribute
    }

    field eitheror type bool {
       indexing: summary | attribute
    }

    field url type uri {
      indexing: summary | index
    }

    field tags type weightedset<string> {
        indexing: attribute | summary
        attribute: fast-search
        weightedset {
            create-if-nonexistent
        }
    }

  }

  rank-profile default inherits default {
    first-phase {
      expression: nativeRank(title,artist) + attribute(popularity)
    }

  }

  rank-profile textmatch inherits default {
    first-phase {
      expression: nativeRank(title,artist)
    }

  }

  document-summary tags {
      summary tags type weightedset<string> {
          full
      }
  }


}