Class JMElasticsearchIndex


  • public class JMElasticsearchIndex
    extends Object
    The type Jm elasticsearch index.
    • Constructor Detail

      • JMElasticsearchIndex

        public JMElasticsearchIndex​(org.elasticsearch.client.Client elasticsearchClient)
        Instantiates a new Jm elasticsearch index.
        Parameters:
        elasticsearchClient - the elasticsearch client
    • Method Detail

      • indexQuery

        public org.elasticsearch.action.index.IndexResponse indexQuery​(org.elasticsearch.action.index.IndexRequestBuilder indexRequestBuilder)
        Index query index response.
        Parameters:
        indexRequestBuilder - the index request builder
        Returns:
        the index response
      • indexQueryAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> indexQueryAsync​(org.elasticsearch.action.index.IndexRequestBuilder indexRequestBuilder)
        Index query async action future.
        Parameters:
        indexRequestBuilder - the index request builder
        Returns:
        the action future
      • upsertQuery

        public org.elasticsearch.action.update.UpdateResponse upsertQuery​(org.elasticsearch.action.update.UpdateRequestBuilder updateRequestBuilder)
        Upsert query update response.
        Parameters:
        updateRequestBuilder - the update request builder
        Returns:
        the update response
      • upsertQueryAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.update.UpdateResponse> upsertQueryAsync​(org.elasticsearch.action.update.UpdateRequestBuilder updateRequestBuilder)
        Upsert query async action future.
        Parameters:
        updateRequestBuilder - the update request builder
        Returns:
        the action future
      • upsertData

        public org.elasticsearch.action.update.UpdateResponse upsertData​(String index,
                                                                         String id,
                                                                         Map<String,​Object> source)
        Upsert data update response.
        Parameters:
        index - the index
        id - the id
        source - the source
        Returns:
        the update response
      • upsertDataAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.update.UpdateResponse> upsertDataAsync​(String index,
                                                                                                                     String id,
                                                                                                                     Map<String,​Object> source)
        Upsert data async action future.
        Parameters:
        index - the index
        id - the id
        source - the source
        Returns:
        the action future
      • upsertData

        public org.elasticsearch.action.update.UpdateResponse upsertData​(String index,
                                                                         String id,
                                                                         String jsonSource)
        Upsert data update response.
        Parameters:
        index - the index
        id - the id
        jsonSource - the json source
        Returns:
        the update response
      • upsertDataAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.update.UpdateResponse> upsertDataAsync​(String index,
                                                                                                                     String id,
                                                                                                                     String jsonSource)
        Upsert data async action future.
        Parameters:
        index - the index
        id - the id
        jsonSource - the json source
        Returns:
        the action future
      • upsertDataWithObjectMapper

        public org.elasticsearch.action.update.UpdateResponse upsertDataWithObjectMapper​(String index,
                                                                                         String id,
                                                                                         Object sourceObject)
        Upsert data with object mapper update response.
        Parameters:
        index - the index
        id - the id
        sourceObject - the source object
        Returns:
        the update response
      • upsertDataASyncWithObjectMapper

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.update.UpdateResponse> upsertDataASyncWithObjectMapper​(String index,
                                                                                                                                     String id,
                                                                                                                                     Object sourceObject)
        Upsert data a sync with object mapper action future.
        Parameters:
        index - the index
        id - the id
        sourceObject - the source object
        Returns:
        the action future
      • sendData

        public org.elasticsearch.action.index.IndexResponse sendData​(String index,
                                                                     String id,
                                                                     Map<String,​Object> source)
        Send data index response.
        Parameters:
        index - the index
        id - the id
        source - the source
        Returns:
        the index response
      • sendData

        public String sendData​(String index,
                               Map<String,​Object> source)
        Send data string.
        Parameters:
        index - the index
        source - the source
        Returns:
        the string
      • sendData

        public org.elasticsearch.action.index.IndexResponse sendData​(String index,
                                                                     String id,
                                                                     String jsonSource)
        Send data index response.
        Parameters:
        index - the index
        id - the id
        jsonSource - the json source
        Returns:
        the index response
      • sendData

        public String sendData​(String index,
                               String jsonSource)
        Send data string.
        Parameters:
        index - the index
        jsonSource - the json source
        Returns:
        the string
      • sendDataWithObjectMapper

        public org.elasticsearch.action.index.IndexResponse sendDataWithObjectMapper​(String index,
                                                                                     String id,
                                                                                     Object sourceObject)
        Send data with object mapper index response.
        Parameters:
        index - the index
        id - the id
        sourceObject - the source object
        Returns:
        the index response
      • sendDataWithObjectMapper

        public String sendDataWithObjectMapper​(String index,
                                               Object sourceObject)
        Send data with object mapper string.
        Parameters:
        index - the index
        sourceObject - the source object
        Returns:
        the string
      • sendDataAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> sendDataAsync​(String index,
                                                                                                                 String id,
                                                                                                                 Map<String,​Object> source)
        Send data async action future.
        Parameters:
        index - the index
        id - the id
        source - the source
        Returns:
        the action future
      • sendDataAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> sendDataAsync​(String index,
                                                                                                                 Map<String,​Object> source)
        Send data async action future.
        Parameters:
        index - the index
        source - the source
        Returns:
        the action future
      • sendDataAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> sendDataAsync​(String index,
                                                                                                                 String id,
                                                                                                                 String jsonSource)
        Send data async action future.
        Parameters:
        index - the index
        id - the id
        jsonSource - the json source
        Returns:
        the action future
      • sendDataAsync

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> sendDataAsync​(String index,
                                                                                                                 String jsonSource)
        Send data async action future.
        Parameters:
        index - the index
        jsonSource - the json source
        Returns:
        the action future
      • sendDataAsyncWithObjectMapper

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> sendDataAsyncWithObjectMapper​(String index,
                                                                                                                                 String id,
                                                                                                                                 Object sourceObject)
        Send data async with object mapper action future.
        Parameters:
        index - the index
        id - the id
        sourceObject - the source object
        Returns:
        the action future
      • sendDataAsyncWithObjectMapper

        public org.elasticsearch.action.ActionFuture<org.elasticsearch.action.index.IndexResponse> sendDataAsyncWithObjectMapper​(String index,
                                                                                                                                 Object sourceObject)
        Send data async with object mapper action future.
        Parameters:
        index - the index
        sourceObject - the source object
        Returns:
        the action future