You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/02/16 23:01:48 UTC
[41/50] incubator-usergrid git commit: add index routing: this will
cause logging errors
add index routing: this will cause logging errors
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f7dc8142
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f7dc8142
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f7dc8142
Branch: refs/heads/USERGRID-365
Commit: f7dc81422a04058458bf32eabb4dc3d9aabd360e
Parents: 7abf3b7
Author: Shawn Feldman <sf...@apache.org>
Authored: Mon Feb 16 12:35:40 2015 -0800
Committer: Shawn Feldman <sf...@apache.org>
Committed: Mon Feb 16 12:35:40 2015 -0800
----------------------------------------------------------------------
.../usergrid/persistence/index/impl/IndexingUtils.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f7dc8142/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 64e4763..14dca3e 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
@@ -43,7 +43,7 @@ public class IndexingUtils {
// These are not allowed in document type names: _ . , | #
public static final String SEPARATOR = "__";
-
+
//
// Reserved UG fields.
//
@@ -151,10 +151,10 @@ public class IndexingUtils {
.startObject()
- .startObject( type )
-
- .startArray("dynamic_templates")
-
+ .startObject(type)
+ /** add routing "_routing":{ "required":false, "path":"ug_entityId" **/
+ .startObject("_routing").field("required",true).field("path",ENTITYID_ID_FIELDNAME).endObject()
+ .startArray("dynamic_templates")
// we need most specific mappings first since it's a stop on match algorithm
.startObject()
@@ -217,7 +217,7 @@ public class IndexingUtils {
.startObject( "template_3" )
.field( "match", GEO_PREFIX + "location" )
.startObject( "mapping" )
- .field( "type", "geo_point" )
+ .field( "type", "geo_point" )
.endObject()
.endObject()
.endObject()