-
Notifications
You must be signed in to change notification settings - Fork 0
Define index mappings from collection metadata #37
Conversation
00755e2
to
a608cdd
Compare
tests/test_elasticsearch.py
Outdated
"build": { | ||
"properties": { | ||
"date": {"type": "date", "format": "strict_date"}, | ||
"id": {"type": "keyword"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: string
tests/test_elasticsearch.py
Outdated
"last_modified": {"type": "long"}, | ||
"build": { | ||
"properties": { | ||
"date": {"type": "date", "format": "strict_date"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format: dateOptionalTime
tests/test_elasticsearch.py
Outdated
mapping = self.get_mapping("bid", "cid") | ||
assert mapping == { | ||
"properties": { | ||
"id": {"type": "keyword"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string field is unsupported for indexes created in 5.x in favor of the text and keyword fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so maybe the ES running on Travis is not up-to-date enough. You should try using the trusty image to run tests on travis.
1f70534
to
5d52d58
Compare
Ref #8
This is another approach to #36.
Since conversion from JSONSchema to ES mapping seems fragile. Let's take another curve and do something less smart but a lot simpler: read an explicit attribute
index:schema
in the collection metadata.@glasserc @n1k0 @Natim @magopian Thoughts?