[docs/models][s]: add list of types to Field documentation.

This commit is contained in:
Rufus Pollock 2012-08-18 02:03:11 +01:00
parent 83fa3dcf29
commit f64b0c9345

View File

@ -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.
<h2 id="dataset">Dataset</h2>
@ -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 <http://www.elasticsearch.org/guide/reference/mapping/>
// 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