Class BulkRequest
java.lang.Object
fr.paris.lutece.plugins.libraryelastic.business.bulk.BulkRequest
Bulk Request class to do bulk operations on Elastic Search with only one request
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAction(AbstractSubRequest action, Object object) Add an entry to the subAction mapgetBulkBody(com.fasterxml.jackson.databind.ObjectMapper mapper) Get body of bulking requestvoidsetMapSubAction(Map<AbstractSubRequest, Object> mapSubAction) Set the SubActions map
-
Constructor Details
-
BulkRequest
public BulkRequest()
-
-
Method Details
-
setMapSubAction
Set the SubActions map- Parameters:
mapSubAction- the map of subactions of bulking request
-
addAction
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
-