0

I am using org.elasticsearch.client:elasticsearch-rest-high-level-client:7.13.2 as elasticsearch dependency as all the previous versions are quarantined in my organization.

However, am now facing deployment issues due to sonarlint failure on the deprecated methods like org.elasticsearch.action.delete.DeleteRequest org.elasticsearch.action.index.IndexRequest org.elasticsearch.action.update.UpdateRequest

Is there an alternative for the above functions to create/update/delete documents in ES. I did search for this topic but could not find a solution.

TIA

Nva
  • 1
  • 1

1 Answers1

1

As far as I'm aware of, only multiple argument constructors are deprecated, the default one and the one with index as an argument can still be used.

    @Deprecated
    public IndexRequest(String index, String type) {
        super(NO_SHARD_ID);
        this.index = index;
        this.type = type;
    }

    
    public IndexRequest(String index) {
        super(NO_SHARD_ID);
        this.index = index;
    }

This may be a dumb suggestion but have you tried using the non-deprecated constructors?