Skip to content

Commit 82b2275

Browse files
committed
Merge remote-tracking branch 'egf2/master'
2 parents 7c53ade + 46f242b commit 82b2275

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sync",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Service synchronizes ElasticSearch with client-data storage",
55
"main": "index.js",
66
"dependencies": {

server.js

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ function addToHandlers(key, handler) {
2525
Object.keys(config.elastic.indices).forEach(index => {
2626
let indexCfg = config.elastic.indices[index];
2727
if (indexCfg.object_type) {
28+
// add mapping for id field
29+
if (!indexCfg.mapping.id) {
30+
indexCfg.mapping.id = {
31+
type: "string",
32+
index: "not_analyzed"
33+
};
34+
}
35+
2836
// add POST handler
2937
addToHandlers(`POST ${indexCfg.object_type}`, event => {
3038
let body = {};

0 commit comments

Comments
 (0)