You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by js...@apache.org on 2023/05/11 14:26:12 UTC

[unomi] branch UNOMI-780-allows-scroll-query-search-event created (now 7c52b2b8f)

This is an automated email from the ASF dual-hosted git repository.

jsinovassinnaik pushed a change to branch UNOMI-780-allows-scroll-query-search-event
in repository https://gitbox.apache.org/repos/asf/unomi.git


      at 7c52b2b8f UNOMI-780 : Allow to use scroll query to get more than 10000 events

This branch includes the following new commits:

     new 7c52b2b8f UNOMI-780 : Allow to use scroll query to get more than 10000 events

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[unomi] 01/01: UNOMI-780 : Allow to use scroll query to get more than 10000 events

Posted by js...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jsinovassinnaik pushed a commit to branch UNOMI-780-allows-scroll-query-search-event
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 7c52b2b8f84ff73947fe94e25008b0d9aa82e9a8
Author: jsinovassin <js...@jahia.com>
AuthorDate: Thu May 11 16:26:04 2023 +0200

    UNOMI-780 : Allow to use scroll query to get more than 10000 events
---
 .../java/org/apache/unomi/services/impl/events/EventServiceImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
index 97944efe4..fe8faa70b 100644
--- a/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java
@@ -313,11 +313,14 @@ public class EventServiceImpl implements EventService {
 
     @Override
     public PartialList<Event> search(Query query) {
+        if (query.getScrollIdentifier() != null) {
+            return persistenceService.continueScrollQuery(Event.class, query.getScrollIdentifier(), query.getScrollTimeValidity());
+        }
         if (query.getCondition() != null && definitionsService.resolveConditionType(query.getCondition())) {
             if (StringUtils.isNotBlank(query.getText())) {
                 return persistenceService.queryFullText(query.getText(), query.getCondition(), query.getSortby(), Event.class, query.getOffset(), query.getLimit());
             } else {
-                return persistenceService.query(query.getCondition(), query.getSortby(), Event.class, query.getOffset(), query.getLimit());
+                return persistenceService.query(query.getCondition(), query.getSortby(), Event.class, query.getOffset(), query.getLimit(), query.getScrollTimeValidity());
             }
         } else {
             if (StringUtils.isNotBlank(query.getText())) {