Class BulkRequest


  • public class BulkRequest
    extends Object
    Bulk Request class to do bulk operations on Elastic Search with only one request
    • Constructor Detail

      • BulkRequest

        public BulkRequest()
    • Method Detail

      • setMapSubAction

        public void setMapSubAction​(Map<AbstractSubRequest,​Object> mapSubAction)
        Set the SubActions map
        Parameters:
        mapSubAction - the map of subactions of bulking request
      • addAction

        public void addAction​(AbstractSubRequest action,
                              Object object)
        Add an entry to the subAction map
        Parameters:
        action - The action
        object - The object on which the action will be done
      • getBulkBody

        public String getBulkBody​(com.fasterxml.jackson.databind.ObjectMapper mapper)
                           throws com.fasterxml.jackson.core.JsonProcessingException
        Get body of bulking request
        Parameters:
        mapper - the Object Mapper
        Returns:
        the body of a bulk request, based on multiple index/create/delete actions
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException