giladw commented on a change in pull request #237:
URL: https://github.com/apache/unomi/pull/237#discussion_r575805765



##########
File path: 
persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
##########
@@ -175,6 +176,17 @@
      */
     boolean update(Item item, Date dateHint, Class<?> clazz, Map<?, ?> source, 
final boolean alwaysOverwrite);
 
+    /**
+     * Updates Map of items of the specified class and identified by the 
specified identifier with a new property value for the specified property name. 
Same as
+     * {@code update(itemId, dateHint, clazz, 
Collections.singletonMap(propertyName, propertyValue))}
+     *
+     * @param items         A map the consist of item (key) and properties to 
update (value)
+     * @param dateHint      a Date helping in identifying where the item is 
located
+     * @param clazz         the Item subclass of the item to update
+     * @return List of failed Items Ids, if all succesful then returns an 
empty list. if the whole operation failed then will return null
+     */
+    List<String> update(Map<Item, Map> items, Date dateHint, Class clazz);

Review comment:
       i wonder where to have it and how.
   the implementation of this method does  use the class for every item request 
in the bulk request.
   also regular update uses a class and item without checks, they rely that it 
will on elastic if index is not found.
   
   
https://github.com/apache/unomi/pull/237/files#diff-cb0ba8419f934aeaa557cb1eded52b588ae98b8f1b9dbe6abd1d67553a0b27b2R977
   
   
https://github.com/apache/unomi/pull/237/files#diff-cb0ba8419f934aeaa557cb1eded52b588ae98b8f1b9dbe6abd1d67553a0b27b2R949
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to