appbaseio / appbaseio/abc

Can't make mappings work

Offen
#167 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
471
Forks
47
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.