-
Notifications
You must be signed in to change notification settings - Fork 2
/
TypeExample-Genome.yaml
97 lines (94 loc) · 4.53 KB
/
TypeExample-Genome.yaml
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
# This specification describes how a Workspace Genome object is transformed into a document that is
# indexed by the KBaseSeachEngine.
# The name of the type in the search system.
global-object-type: Genome
# The data source of the objects, in this case the Workspace.
storage-type: WS
# The name of the type in the data source.
storage-object-type: KBaseGenomes.Genome
# IMPORTANT NOTE: Once a type version is established in the search system, the type version
# CANNOT be changed or given a new version number (i.e. by changing the ordering of the versions)
# without dropping the ElasticSearch indexes for the type.
# This list contains different versions of the parsing rules used to parse the specified
# storage-object-type. The list is ordered by version number. Each parsing rule version results
# in a corresponding search type version. The mapping between the source storage-object-type
# version and the target search type version is specified by the type mappings.
# If no type mapping is specified for this type, the latest version is used.
versions:
-
# The following rules describe which fields are extracted from the source object and
# transforms performed upon said fields.
indexing-rules:
-
# Extract a keyword from the /id path. The key name will be id.
path: id
keyword-type: keyword
-
# Extract a keyword from the /domain path. The key name will be domain.
path: domain
keyword-type: keyword
-
# Extract a full-text search field from the /taxonomy path. A full-text field is
# parsed into tokens which can be searched on individually, as opposed to a keyword
# field which is an opaque block and must be matched in its entirety.
# The key name will be taxonomy.
path: taxonomy
full-text: true
-
# Extract a full-text search field from the /scientific_name path.
# The key name will be scientific_name.
path: scientific_name
full-text: true
-
# for sorting by scientific name we need a keyword form
path: scientific_name
key-name: scientific_name_keyword
keyword-type: keyword
-
# Extract the number of features from a list at the /features path. The special
# {size} element directs the parser to return the size of a list or mapping. Since
# this number will be an integer, the keyword type is set as such.
# The key name is explicitly set to features, rather than implicitly set by the
# first section of the path.
path: features/{size}
keyword-type: integer
key-name: feature_count
-
path: cdss/{size}
keyword-type: integer
key-name: cds_count
ui-name: CDSs
-
path: mrnas/{size}
keyword-type: integer
key-name: mrna_count
ui-name: mRNAs
-
path: num_contigs
keyword-type: integer
key-name: contig_count
-
path: source
keyword-type: keyword
-
path: source_id
keyword-type: keyword
-
# Extract a reference to an Assembly object and transform it into a Globally
# Unique ID (GUID).
# The reference is at the /assembly_ref path.
path: assembly_ref
# The reference will be transformed into a GUID.
transform: guid
# The expected type of the object to which the reference refers is an Assembly.
# This is a search system type, not a data source type.
target-object-type: Assembly
target-object-type-version: 1
# If there is no value at the path location, substitute an empty list instead.
optional-default-value: []
# Index the transformed GUID as a keyword.
keyword-type: keyword
# The key for the transformed GUID in the search document will be assembly_guid.
key-name: assembly_guid
# Don't show the guid in any UI context when displaying search data.
ui-hidden: true