usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [1/3] incubator-usergrid git commit: create correct context
Date Fri, 20 Mar 2015 01:00:11 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-480 735eedb2c -> d6bcf4bf3


create correct context


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

Branch: refs/heads/USERGRID-480
Commit: 1dd6ead8a8426dc5e97910668d140da46767fa18
Parents: 735eedb
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu Mar 19 17:48:42 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu Mar 19 17:48:42 2015 -0600

----------------------------------------------------------------------
 .../usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java  | 4 ++--
 .../apache/usergrid/persistence/index/impl/IndexingUtils.java    | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1dd6ead8/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
index 1082201..38bf381 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
@@ -98,7 +98,7 @@ public class EsEntityIndexBatchImpl implements EntityIndexBatch {
         entity.setField(
             new StringField(APPLICATION_ID_FIELDNAME, IndexingUtils.idString(applicationScope.getApplication()))
         );
-        final String context = createContextName(indexScope);
+        final String context = createContextName(applicationScope,indexScope);
 
         if ( log.isDebugEnabled() ) {
             log.debug( "Indexing entity {}:{}\n   alias: {}\n" +
@@ -134,7 +134,7 @@ public class EsEntityIndexBatchImpl implements EntityIndexBatch {
         ValidationUtils.verifyIdentity(id);
         ValidationUtils.verifyVersion( version );
 
-        final String context = createContextName(indexScope);
+        final String context = createContextName(applicationScope,indexScope);
         final SearchType entityType =SearchType.fromId(id);
 
         final String indexId = createIndexDocId( id, version, context );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1dd6ead8/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java
index c74ce93..c365ff4 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java
@@ -65,8 +65,10 @@ public class IndexingUtils {
       * @param scope
       * @return
       */
-     public static String createContextName( IndexScope scope ) {
+     public static String createContextName(ApplicationScope applicationScope, IndexScope
scope ) {
          StringBuilder sb = new StringBuilder();
+         idString(sb,applicationScope.getApplication());
+         sb.append(SEPARATOR);
          idString(sb, scope.getOwner());
          sb.append( SEPARATOR );
          sb.append( scope.getName() );


Mime
View raw message