ejsIndexedShape

A shape which has already been indexed in another index and/or index type. This is particularly useful for when you have a pre-defined list of shapes which are useful to your application and you want to reference this using a logical name (for example ‘New Zealand’) rather than having to provide their coordinates each time.

Module

 IndexedShape

IndexedShape ( type, id )

Defines a shape that already exists in an index/type.


Parameters
type <String> The name of the type where the shape is indexed.
id <String> The document id of the shape.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectid(id)Sets the document id of the indexed shape.
Objectindex(idx)Sets the index which the shape is indexed under. Defaults to "shapes".
ObjectshapeFieldName(field)Sets the field name containing the indexed shape. Defaults to "shape".
StringtoJSON()Retrieves the internal script object. This is typically used by internal API functions so use with caution.
Objecttype(t)Sets the type which the shape is indexed under.

Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 id

Object id ( id )
Sets the document id of the indexed shape.

Parameters
id <String> a valid document id.
Returns
returns this so that calls can be chained.

 index

Object index ( idx )
Sets the index which the shape is indexed under. Defaults to "shapes".

Parameters
idx <String> a valid index name.
Returns
returns this so that calls can be chained.

 shapeFieldName

Object shapeFieldName ( field )
Sets the field name containing the indexed shape. Defaults to "shape".

Parameters
field <String> a valid field name.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )
Retrieves the internal script object. This is typically used by internal API functions so use with caution.

Returns
returns this object's internal object representation.

 type

Object type ( t )
Sets the type which the shape is indexed under.

Parameters
t <String> a valid shape type.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo