nbcp.myoql.db.es.component.EsBulkUpdateClip.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktmyoql Show documentation
Show all versions of ktmyoql Show documentation
kotlin orm -- mysql,mongo , just like ktorm
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;
}
}