-
Notifications
You must be signed in to change notification settings - Fork 0
Collection Schema Scructure
cpliakas edited this page Feb 20, 2013
·
11 revisions
The schema that models the collection's source data is usually stored in a YAML file named after the collection library's unique identifier and stored in its conf/collection
directory. This page documents the structure of the file and provides details on the various options.
fields:
link:
label: Link
description: Defines the hyperlink to the item.
type: string
store: true
unique: true
description: Describes the item.
type: string
store: true
analyze: true
date:
label: Publication date
description: Defines the last-publication date for the item
type: date
unique_field: link
-
fields
: A nested group of field definitions keyed by unique identifier. The field definitions are below: -
name
: (optional, defaults to defaults unique identifier) The name of the field as stored in the index. -
label
: The human readable label of the field usually displayed in administrative forms and facet titles. -
description
: The longer description of the field. -
type
: The field's data type, e.g. "string", "boolean", etc. See the "Data Types" section below for more details. -
size
: (optional, default dependent on type) Some data types, for example "decimal", require a size attribute to determine the precision or size od the value being stored. -
analyze
: (optional, defaults tofalse
) Whether the value should be analyzed, or processed, by the backend. The default behavior is to store the value as passed to the backend, which is not optimal for fulltext indexing. -
index
: (optional, defaults totrue
) Whether the value is indexed and able to be searched. -
store
: (optional, defaults tofalse
) Whether the original source data is stored in the index for retrieval. -
mulitvalue
: (optional, defaults tofalse
) Whether the field stores multiple values per document. -
unique_field
: The id of the field containing the document's unique identifier. -
all_text_field
: -
default_fields
:
-
string
: Used for all text. Set theanalyze
option totrue
for fulltext fields. -
integer
: Whole numbers, acceptssize
options oflong
(default),short
, andbyte
. -
decimal
: Acceptssize
options offloat
(default) anddouble
. -
date
: Temporal data in any format. -
boolean
: Data with only two possible values, usually true or false. -
binary
: Raw binary data usually containing the contents of files such as thumbnail images. -
location
: Geospatial data, not fully vetted.