elasticsearch-jdbc icon indicating copy to clipboard operation
elasticsearch-jdbc copied to clipboard

Mixing Up Field Types error SQL Server varchar to ES IP type

Open JRRan64 opened this issue 9 years ago • 1 comments

ES 2.3.4, JDBC Importer 2.3.4, many other types working including string, long, geoshape (points) pulling from a SQL Server table.

I cannot get IP types to work. They are stored in varchar(40) columns eg ("1.2.3.4") and there is no IPv6 data affecting me (yet).

For every row, I get an error in the log .... [row#] index [indexname], type [indextype], id [uidweuse], message [MapperParsingException[failed to parse]; nested: IllegalStateException[Mixing up field types: class org.elasticsearch.index.mapper.core.LongFieldMapper$LongFieldType != class org.elasticsearch.index.mapper.ip.IpFieldMapper$IpFieldType on field ipfieldname

JRRan64 avatar Oct 04 '16 18:10 JRRan64

Create an explicit mapping with IP type.

jprante avatar Oct 05 '16 12:10 jprante