From f64b0c93456f5414816b7ba0f1862947deb305e9 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Sat, 18 Aug 2012 02:03:11 +0100 Subject: [PATCH] [docs/models][s]: add list of types to Field documentation. --- docs/models.markdown | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/models.markdown b/docs/models.markdown index cdef8e8f..df6c1451 100644 --- a/docs/models.markdown +++ b/docs/models.markdown @@ -16,10 +16,9 @@ Records. Additionally, there is a a Field object for describing the columns of a Dataset, a Query object for describing queries, and a Facet object for holding summary information about a Field (or multiple Fields). -# Models - All the models are Backbone models, that is they extend Backbone.Model. Note, -however that they do not 'sync' (load/save) like normal Backbone models. +however, that they do not 'sync' (load/save) like normal Backbone models. +

Dataset

@@ -92,8 +91,7 @@ var field = new Field({ label: 'My Field Name', // (optional: defaults to string) the type of the data in this field. - // Should be a string as per type names defined by ElasticSearch - see - // Types list on + // For list of type names see below type: 'string', // (optional - defaults to null) used to indicate how the data should be @@ -105,6 +103,21 @@ var field = new Field({ is_derived: false {% endhighlight %} +#### Types + +Types are based on the [type set of elasticsearch][types-1] with a few minor additions and modifications: + +[types-1]: http://www.elasticsearch.org/guide/reference/mapping/ + +* string +* integer (long) +* float (double) +* boolean +* geo_point +* geojson +* array +* object + #### Rendering, types and formats One can customize the rendering of fields in the user interface and elsewhere