elastic-rs / elastic

An Elasticsearch REST API client for Rust
Apache License 2.0
253 stars 40 forks source link

Add index field to number mapping serialization #397

Closed avitex closed 4 years ago

mwilliammyers commented 4 years ago

Not super familiar with this part of the code, and just glancing at this file:

Does this just allow i32 fields to be indexed/searchable by default?

This comment is kinda throwing me off:

Accepts `not_analyzed` (default) and `no`

and leading me to think it is referring to the field being analyzed.

avitex commented 4 years ago

All this change is concerned about is that the index mapping attribute is not set when it can be specified as part of elastic (and this library). Basically tells elastic whether or not to index the field. It exists on the trait, however is not serialized.

There are a number of comments like your above example that do not make sense.

avitex commented 4 years ago

Note, I need to increase the field count to 9 on the struct serializer

mwilliammyers commented 4 years ago

Ok great, that’s what I thought. Thanks for finding and fixing this! Once you increase the field count to 9, I’ll go ahead and merge this.