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​(Map<String,​?> source,
                                                                         String index,
                                                                         String type,
                                                                         String id)
        Upsert data update response.
        Parameters:
        source - the source
        index - the index
        type - the type
        id - the id
        Returns:
        the update response
      • upsertDataAsync

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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