1.0.4 • Published 8 years ago

replay-elastic v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Initialization

PUT videometadatas
{
   "settings" : {
       "index" : {
           "number_of_shards" :5,
           "number_of_replicas" : 1
       }
   },
   "mappings": {
       "videometadata": {
            "properties": {
              "sourceId": { "type": "integer" },
              "videoId": { "type": "string" },
              "receivingMethod": { "type": "nested"},
              "timestamp": { "type": "date" },
              "sensorPosition": { "type": "geo_point" },
              "sensorTrace": { "type": "geo_shape" },
              "data": { "type": "object" }
            }
       }
    }
}

You can also use the replay-db-initialization helper module instead.

Or at last, you can call the direct initialization method:

node -e 'require("./index").createVideoMetadataIndex()'

Environment variables

NameDescriptionDefault
ELASTIC_VIDEO_METADATA_INDEXThe index of the VideoMetadata in Elasticvideometadatas
ELASTIC_VIDEO_METADATA_TYPEThe type of the VideoMetadata in Elasticvideometadata

Host & Port are intentionally not here, because they are receieved from the activating process.