diff --git a/docs/api-reference.md b/docs/api-reference.md index 8975655d9..890b37941 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -103,13 +103,16 @@ Creates a field in the given index with the given name. The request payload is in JSON, and may contain the `options` field. The `options` field is a JSON object which must contain a `type` along with the corresponding configuration options. * `set` - * `cacheType` (string): [ranked](../data-model/#ranked) or [LRU](../data-model/#lru) caching on this field. Default is `lru`. - * `cacheSize` (int): Number of rows to keep in the cache. Default 50,000. + * `cacheType` (string): [ranked](../data-model/#ranked) or [LRU](../data-model/#lru) caching on this field. Default is `ranked`. + * `cacheSize` (int): Number of rows to keep in the cache. Default is 50,000. * `int` * `min` (int): Minimum integer value allowed for the field. * `max` (int): Maximum integer value allowed for the field. * `time` * `timeQuantum` (string): [Time Quantum](../data-model/#time-quantum) for this field. +* `mutex` + * `cacheType` (string): [ranked](../data-model/#ranked) or [LRU](../data-model/#lru) caching on this field. Default is `ranked`. + * `cacheSize` (int): Number of rows to keep in the cache. Default is 50,000. The following example creates an `int` field called "quantity" capable of storing values from -1000 to 2000: diff --git a/docs/data-model.md b/docs/data-model.md index 4609032fc..ba7c12024 100644 --- a/docs/data-model.md +++ b/docs/data-model.md @@ -117,7 +117,7 @@ Query operations run in parallel, and they are evenly distributed across a clust ### Field Type -Upon creation, fields are configured to be of a certain type. Pilosa supports three field types: `set`, `int`, and `time`. +Upon creation, fields are configured to be of a certain type. Pilosa supports the following field types: `set`, `int`, `time`, and `mutex`. #### Set @@ -188,3 +188,7 @@ Set(3, A=8, 2017-05-19T00:00) ![time quantum field diagram](/img/docs/field-time-quantum.svg) *Time quantum fueld diagram* + +#### Mutex + +Mutex fields are similar to `set` fields, with the distinction of requiring the row value for each column to be mutually exclusive. In other words, each column can only have a single value for the field. If the field value for a column is updated on a `mutex` field, then the previous field value for that column will be cleared. This field type is like a field in an RDBMS table where every record contains a single value for a particular field. diff --git a/docs/glossary.md b/docs/glossary.md index 550b9017b..c39a0bf6f 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -22,7 +22,7 @@ nav = [] Fragment: A Fragment is the intersection of a [field](#field) and a [shard](#shard) in an [index](#index). -[Field](../data-model/#field): Fields are used to group [rows](#row) into different categories. Row IDs are namespaced by field such that the same row ID in a different field refers to a different row. For [ranked](#topn) fields, rows are kept in sorted order within the field. Fields are one of three types: set, [int](#bsi), and time. For more information, see [data model](../data-model/) and [Creating fields](../api-reference/#create-field). +[Field](../data-model/#field): Fields are used to group [rows](#row) into different categories. Row IDs are namespaced by field such that the same row ID in a different field refers to a different row. For [ranked](#topn) fields, rows are kept in sorted order within the field. Fields are one of four types: set, [int](#bsi), time, and mutex. For more information, see [data model](../data-model/) and [Creating fields](../api-reference/#create-field). [Frame](../data-model/#field): Prior to Pilosa 1.0, fields were known as frames.