类 ESFactory

java.lang.Object
tech.mhuang.pacebox.elasticsearch.server.ESFactory
所有已实现的接口:
IESFactory

public class ESFactory extends Object implements IESFactory
es工厂实现类
从以下版本开始:
1.0.0
作者:
mhuang
  • 构造器详细资料

    • ESFactory

      public ESFactory()
  • 方法详细资料

    • setName

      public void setName(String name)
      指定者:
      setName 在接口中 IESFactory
    • setClient

      public void setClient(co.elastic.clients.elasticsearch.ElasticsearchClient client)
      指定者:
      setClient 在接口中 IESFactory
    • getBuilder

      public ESSearchBuilder getBuilder()
      从接口复制的说明: IESFactory
      获取构造器
      指定者:
      getBuilder 在接口中 IESFactory
      返回:
      ESSearchBuilder
    • getQuery

      public AbstractESQuery getQuery()
      从接口复制的说明: IESFactory
      获取es查询实现类
      指定者:
      getQuery 在接口中 IESFactory
      返回:
      AbstractESQuery
    • insert

      public <T> co.elastic.clients.elasticsearch.core.IndexResponse insert(T t) throws IOException
      插入
      指定者:
      insert 在接口中 IESFactory
      参数:
      t - 插入的数据
      返回:
      IndexResponse
      抛出:
      IOException
    • insert

      public <T> co.elastic.clients.elasticsearch.core.IndexResponse insert(T t, String index) throws IOException
      从接口复制的说明: IESFactory
      新增
      指定者:
      insert 在接口中 IESFactory
      参数:
      t - 新增的数据
      index - 新增的数据中的索引
      返回:
      String 返回id
      抛出:
      IOException - io异常
    • insert

      public co.elastic.clients.elasticsearch.core.IndexResponse insert(String data, String index) throws IOException
      从接口复制的说明: IESFactory
      新增
      指定者:
      insert 在接口中 IESFactory
      参数:
      data - 新增的数据
      index - 新增的数据中的索引
      返回:
      String 返回id
      抛出:
      IOException - io异常
    • update

      public <T> co.elastic.clients.elasticsearch.core.UpdateResponse update(T t, String id) throws IOException
      ES更新
      指定者:
      update 在接口中 IESFactory
      参数:
      t - 更新的对象
      id - 修改的id
      返回:
      UpdateResponse
      抛出:
      IOException - io异常
      另请参阅:
    • update

      public <T> co.elastic.clients.elasticsearch.core.UpdateResponse update(T t, String index, String id) throws IOException
      从接口复制的说明: IESFactory
      数据更新
      指定者:
      update 在接口中 IESFactory
      参数:
      t - 更新的数据
      index - 更新的索引
      id - 更新的id
      返回:
      UpdateResponse
      抛出:
      IOException - io异常
    • delete

      public co.elastic.clients.elasticsearch._types.AcknowledgedResponse delete(String index) throws IOException
      从接口复制的说明: IESFactory
      删除索引及数据
      指定者:
      delete 在接口中 IESFactory
      参数:
      index - 索引
      返回:
      AcknowledgedResponse
      抛出:
      IOException
    • delete

      public co.elastic.clients.elasticsearch.core.DeleteResponse delete(String index, String id) throws IOException
      从接口复制的说明: IESFactory
      通过id删除数据
      指定者:
      delete 在接口中 IESFactory
      参数:
      index - 删除的索引
      id - 删除的id
      返回:
      DeleteResponse
      抛出:
      IOException
    • update

      public co.elastic.clients.elasticsearch.core.UpdateResponse update(String data, String index, String id) throws IOException
      从接口复制的说明: IESFactory
      数据更新
      指定者:
      update 在接口中 IESFactory
      参数:
      data - 更新的数据
      index - 更新的索引
      id - 更新的id
      返回:
      UpdateResponse
      抛出:
      IOException - io异常
    • getClient

      public co.elastic.clients.elasticsearch.ElasticsearchClient getClient()
      从接口复制的说明: IESFactory
      获取链接
      指定者:
      getClient 在接口中 IESFactory
      返回:
      TransportClient 返回链接对象