Class BulkRequest
- java.lang.Object
-
- fr.paris.lutece.plugins.libraryelastic.business.bulk.BulkRequest
-
public class BulkRequest extends Object
Bulk Request class to do bulk operations on Elastic Search with only one request
-
-
Constructor Summary
Constructors Constructor Description BulkRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(AbstractSubRequest action, Object object)Add an entry to the subAction mapStringgetBulkBody(com.fasterxml.jackson.databind.ObjectMapper mapper)Get body of bulking requestvoidsetMapSubAction(Map<AbstractSubRequest,Object> mapSubAction)Set the SubActions map
-
-
-
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 actionobject- 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
-
-