所有已知实现类:
ESFactory

public interface IESFactory
es接口层
从以下版本开始:
1.0.0
作者:
mhuang
  • 方法概要

    修饰符和类型
    方法
    说明
    co.elastic.clients.elasticsearch._types.AcknowledgedResponse
    delete(String index)
    删除索引及数据
    co.elastic.clients.elasticsearch.core.DeleteResponse
    delete(String index, String id)
    通过id删除数据
    获取构造器
    co.elastic.clients.elasticsearch.ElasticsearchClient
    获取链接
    获取es查询实现类
    co.elastic.clients.elasticsearch.core.IndexResponse
    insert(String data, String index)
    新增
    <T> co.elastic.clients.elasticsearch.core.IndexResponse
    insert(T t)
    新增
    <T> co.elastic.clients.elasticsearch.core.IndexResponse
    insert(T data, String index)
    新增
    void
    setClient(co.elastic.clients.elasticsearch.ElasticsearchClient client)
     
    void
     
    co.elastic.clients.elasticsearch.core.UpdateResponse
    update(String data, String index, String id)
    数据更新
    <T> co.elastic.clients.elasticsearch.core.UpdateResponse
    update(T t, String id)
    修改
    <T> co.elastic.clients.elasticsearch.core.UpdateResponse
    update(T data, String index, String id)
    数据更新
  • 方法详细资料

    • setName

      void setName(String name)
    • setClient

      void setClient(co.elastic.clients.elasticsearch.ElasticsearchClient client)
    • getBuilder

      ESSearchBuilder getBuilder()
      获取构造器
      返回:
      ESSearchBuilder
    • getQuery

      AbstractESQuery getQuery()
      获取es查询实现类
      返回:
      AbstractESQuery
    • insert

      <T> co.elastic.clients.elasticsearch.core.IndexResponse insert(T t) throws IOException
      新增
      参数:
      t - 新增的数据
      返回:
      String 返回对应的id
      抛出:
      IOException
    • insert

      <T> co.elastic.clients.elasticsearch.core.IndexResponse insert(T data, String index) throws IOException
      新增
      参数:
      data - 新增的数据
      index - 新增的数据中的索引
      返回:
      String 返回id
      抛出:
      IOException - io异常
    • insert

      co.elastic.clients.elasticsearch.core.IndexResponse insert(String data, String index) throws IOException
      新增
      参数:
      data - 新增的数据
      index - 新增的数据中的索引
      返回:
      String 返回id
      抛出:
      IOException - io异常
    • update

      <T> co.elastic.clients.elasticsearch.core.UpdateResponse update(T t, String id) throws IOException
      修改
      参数:
      t - 修改的数据
      id - 修改的id
      返回:
      UpdateResponse
      抛出:
      IOException - io异常
    • update

      co.elastic.clients.elasticsearch.core.UpdateResponse update(String data, String index, String id) throws IOException
      数据更新
      参数:
      data - 更新的数据
      index - 更新的索引
      id - 更新的id
      返回:
      UpdateResponse
      抛出:
      IOException - io异常
    • update

      <T> co.elastic.clients.elasticsearch.core.UpdateResponse update(T data, String index, String id) throws IOException
      数据更新
      参数:
      data - 更新的数据
      index - 更新的索引
      id - 更新的id
      返回:
      UpdateResponse
      抛出:
      IOException - io异常
    • delete

      co.elastic.clients.elasticsearch._types.AcknowledgedResponse delete(String index) throws IOException
      删除索引及数据
      参数:
      index - 索引
      返回:
      AcknowledgedResponse
      抛出:
      IOException
    • delete

      co.elastic.clients.elasticsearch.core.DeleteResponse delete(String index, String id) throws IOException
      通过id删除数据
      参数:
      index - 删除的索引
      id - 删除的id
      返回:
      DeleteResponse
      抛出:
      IOException
    • getClient

      co.elastic.clients.elasticsearch.ElasticsearchClient getClient()
      获取链接
      返回:
      TransportClient 返回链接对象