# replay-elastic

> ``` PUT videometadatas { "settings" : { "index" : { "number_of_shards" :5, "number_of_replicas" : 1 } }, "mappings": { "videometadata": { "properties": { "sourceId": { "type": "

Latest version **1.0.4** (published 2016-08-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install replay-elastic
pnpm add replay-elastic
yarn add replay-elastic
bun add replay-elastic
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2016-08-23 |
| First published | 2016-07-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | replay_team |

## Links

- npm: https://www.npmjs.com/package/replay-elastic
- npm.io page: https://npm.io/package/replay-elastic

## Dependencies (2)

- [bluebird](https://npm.io/package/bluebird.md) ^3.4.1
- [elasticsearch](https://npm.io/package/elasticsearch.md) ^11.0.1

## Recent versions

- 1.0.4 (latest) — 2016-08-23
- 1.0.3 — 2016-08-04
- 1.0.2 — 2016-07-28
- 1.0.0 — 2016-07-24

## README

## 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](https://github.com/linnovate/replay-common/tree/develop/replay-db-initialization) helper module instead.

Or at last, you can call the direct initialization method:
```
node -e 'require("./index").createVideoMetadataIndex()'
```

## Environment variables

| Name                          | Description                                  | Default        |
|-------------------------------|----------------------------------------------|----------------|
| ELASTIC_VIDEO_METADATA_INDEX  | The index of the VideoMetadata in Elastic    | videometadatas |
| ELASTIC_VIDEO_METADATA_TYPE   | The type of the VideoMetadata in Elastic     | videometadata  |

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

---
_Source: https://npm.io/package/replay-elastic · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
