appbaseio / appbaseio/abc

Can't make mappings work

Open
#167 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
471
Forks
47
PR merge metrics
No merged PRs in 30d

Description

I'm using abc version 1.0.0-alpha.0 and Elasticsearch version 7.2.

This is probably not a problem with abc itself but with my understanding of the documentation (or my lack of understanding to be precise).

I'm trying to force a field to be a float instead of a long. My transform file is the following one:

```
t.Source('source', source, '/movements/')
.Mapping({
"index.movements": {
"properties": {
"movement": {
"properties": {
"amount": { "type": "float" }
}
}
}
}
})
.Transform(otto({'filename': '/home/ubuntu/project-metrics/import-process/transforms/movements.js'}))
.Save('sink', sink, '/.*/');
```

And my abc transform command:
```
abc import --bulk_requests=100 --src_type=mongodb --src_uri='mongodb://localhost:27017/database' --transform_file='./movements.js' 'http://localhost:9200/index.movements'
```

My index is called index.movements and every field is called movement.[field_name]. When I run the command and look in elasticsearch the index.movements index mapping I get this:
```
{
"mapping": {
"properties": {
"movement": {
"properties": {
"amount": {
"type": "long"
}
}
}
}
}
}
```

Probably I'm missing something but I can't figure out what. Thank you all in advance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.