Deprecation warnings using elasticsearch 5.1.1

Nigel Brown <ni...@...>

I was using the code in the master, specifically to test the excellent It all seems to be working, but on startup, where I create the indices, I see the following warnings

13:07:31.152 [I/O dispatcher 1] WARN  org.elasticsearch.client.RestClient - request [PUT http://localhost:9200/janusgraph/_mapping/mixedE] returned 1 warnings: [The [string] field is deprecated, please us

e [text] or [keyword] instead on [event_name]]

13:07:33.212 [I/O dispatcher 1] WARN  org.elasticsearch.client.RestClient - request [PUT http://localhost:9200/janusgraph/_mapping/identity_usernameTextKey] returned 1 warnings: [The [string] field is dep

recated, please use [text] or [keyword] instead on [identity_username]]

The elasticsearch version was 5.1.1.

Is this expected for now?

I couldn't see a simple way round this in the code.

sjudeng <sju...@...>

Yes this is expected. The Elasticsearch 5.x REST API is backwards compatible with Elasticsearch 2.x. JanusGraph is leveraging this, which means separate modules/profiles are not required for ES 2.x/5.x compatibility. But the disadvantage is the deprecation warnings.

I've been meaning to start a discussion on next steps for ES. I wanted to propose we consider migrating from using the ES QueryBuilders/Settings API to manually building the request objects. Among other things I think this would make it easy to add compatibility shims for ES versions to resolve deprecation warnings and maybe more importantly take advantage of any new features of interest in newer versions, without requiring separate modules/profiles.

Nigel Brown <ni...@...>

Thanks, that is what I thought.

For what it is worth, I think you should initially prefer the newer versions as janusgraph is new.