# 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 { 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 } }