All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nbcp.myoql.db.es.component.EsBulkUpdateClip.kt Maven / Gradle / Ivy

The newest version!
package nbcp.myoql.db.es

import nbcp.myoql.db.es.component.EsBaseMetaEntity
import nbcp.myoql.db.es.component.EsBaseBulkUpdateClip
import nbcp.myoql.db.es.enums.EsPutRefreshEnum
import java.io.Serializable

/**
 * Created by udi on 17-4-7.
 */

//根据Id,更新Es的一个键。

/**
 * EsUpdate
 * https://www.elastic.co/guide/en/elasticsearch/reference/7.6/docs-update-by-query.html
 * https://www.elastic.co/guide/cn/elasticsearch/guide/current/partial-updates.html
 */
class EsBulkUpdateClip,E : Serializable>(var moerEntity: M)
    : EsBaseBulkUpdateClip(moerEntity.tableName) {

    fun add(entity: E): EsBulkUpdateClip {
        super.addEntity(entity)
        return this;
    }

    @JvmOverloads
    fun routing(routing:String = ""):  EsBulkUpdateClip {
        this.withRouting(routing)
        return this;
    }

    @JvmOverloads
    fun pipeline(pipeline:String = ""): EsBulkUpdateClip {
        this.withPipeLine(pipeline)
        return this;
    }

    fun refresh(refresh: EsPutRefreshEnum): EsBulkUpdateClip {
        this.withRefresh(refresh)
        return this;
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy