Collection Data Model


Before importing data, it is important to understand data model of Clusterpoint database.

As explained in Main Concepts introductory section of this manual, in Clusterpoint database, data in collection is managed in self-contained units called documents.

Each document in turn can have hierarchically organized fields. Clusterpoint when storing documents discovers what fields can be present in particular collection of documents and assembles this information in specification that we call Data Model.

Data Model could be changed and overriden in Web UI Configure section for each collection separately.

Apart from name of the field Clusterpoint discovers their type and cardinality thus for each field Data Model records the following attributes:


Attribute
Description
Values

index_typeType of the primary lookup index. For NUMBER, DATA, STRING option variable of such type will be referencable in WHERE, ORDER BY and GROUP BY clauses. Note that SELECT clause can reference fields with index_type=NONE, but that requires reading and deserializing entire document instead of accessing index.

FLOAT,

INTEGER,

STRING,

BOOLEAN,

DATETIME

cardinality
*is not editable
Frequency of field compared to document

ONE - every document has a field

MANY - every document may have several fields

MIXED - combination of ONE and MANY

*is shown only for MANY or MIXED types

full_text_searchContents of this field will be indexed for full-text search. If YES, contents of the fields will be searchable with CONTAINS operator.YES, NO
weightWhen this field is indexed for full text search weight interval that hits in this field contribute to relevancy.N - M
primary_keySpecifies if this field is primary key. If none of the fields is specified as primary key, it is auto assigned and stored outside of the document content itself. Name of "_id" field could be changed only if database does not have documents.
YES, NO


Note: after you have made changes in Data Model or Configuration and your collection already contains documents, it is necessary to Reindex collection in order to activate new Data Model for existing documents.