usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [15/38] usergrid git commit: Ensure that when specific apps are re-indexed, their index is initialized.
Date Wed, 17 Aug 2016 21:48:22 GMT
Ensure that when specific apps are re-indexed, their index is initialized.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6ef4c321
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6ef4c321
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6ef4c321

Branch: refs/heads/master
Commit: 6ef4c32114044d22d9d74e42033a0cccdd2069ab
Parents: 65e873e
Author: Michael Russo <michaelarusso@gmail.com>
Authored: Sat Feb 13 21:23:52 2016 -0800
Committer: Michael Russo <michaelarusso@gmail.com>
Committed: Sat Feb 13 21:23:52 2016 -0800

----------------------------------------------------------------------
 .../usergrid/corepersistence/index/ReIndexServiceImpl.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/6ef4c321/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
index da2ef1d..6c65976 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
@@ -221,7 +221,13 @@ public class ReIndexServiceImpl implements ReIndexService {
         }
         //this is intentional.  If
         else if (appId.isPresent()) {
-            return Observable.just(appId.get());
+            return Observable.just(appId.get())
+                .doOnNext(appScope -> {
+                    //make sure index is initialized on rebuild
+                    entityIndexFactory.createEntityIndex(
+                        indexLocationStrategyFactory.getIndexLocationStrategy(appScope)
+                    ).initialize();
+                });
         }
 
         return allApplicationsObservable.getData()


Mime
View raw message