[ 
https://issues.apache.org/jira/browse/USERGRID-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Todd Nine updated USERGRID-536:
-------------------------------
    Description: 
Currently, our dynamic mapping causes several issues with elastic search.  We 
should change our mapping to use a static structure, and resolve this 
operational pain.

We need to make the following changes.

h2. Modify our IndexScope.  

This should more closely resemble the elements of an edge since this represents 
an edge. This scope should be refactored into the following objects.  

* IndexEdge - Id, name, timestamp, edgeType (source or target)
* SearchEdge - Id, name, edgeType

Note: edgeType is the type of the Id within the edge.  Does this Id represent a 
source Id, or does it represent a targetId?  The entity to be indexed will 
implicitly be the opposite of the type specified.  I.E if it's a source edge, 
the document is the target.  If it's a target edge, the document is the source.

These values should also be stored within our document, so that we can index 
our documents.  Note that we perform bidirectional indexing in some cases, such 
was users, groups etc.  When we do this, we need to ensure that mark the 
direction of the edge appropriately.


h2. Create a static mapping.  

The mapping should contains the following static fields.

* entityId - The entity id
* entityVersion - The entity version
* edgeId - The edge Id
* edgeName - The edge name
* edgeTimestamp - The edge timestamp
* edgeType - source | target
* searchEdge - edgeId + edgeName + edgeType


It will then contain an array of "fields"  Each of these fields will have the 
following formation.

{code}
{ "name":"[entity field name], "[field type]":[field value}
{code}






  was:
Currently, our dynamic mapping causes several issues with elastic search.  We 
should change our mapping to use a static structure, and resolve this 
operational pain.

We need to make the following changes.

h2. Modify our IndexScope.  

This should more closely resemble the elements of an edge since this represents 
an edge. This scope should be refactored into the following objects.

* IndexEdge * - Id, name, timestamp
* SearchEdge * Id, name

These values should also be stored within our document, so that we can index 
our documents.


h2. Create a static mapping.  

The mapping should contains the following static fields.






> Change our index structure to eliminate static mapping
> ------------------------------------------------------
>
>                 Key: USERGRID-536
>                 URL: https://issues.apache.org/jira/browse/USERGRID-536
>             Project: Usergrid
>          Issue Type: Story
>          Components: Stack
>            Reporter: Todd Nine
>            Assignee: Todd Nine
>
> Currently, our dynamic mapping causes several issues with elastic search.  We 
> should change our mapping to use a static structure, and resolve this 
> operational pain.
> We need to make the following changes.
> h2. Modify our IndexScope.  
> This should more closely resemble the elements of an edge since this 
> represents an edge. This scope should be refactored into the following 
> objects.  
> * IndexEdge - Id, name, timestamp, edgeType (source or target)
> * SearchEdge - Id, name, edgeType
> Note: edgeType is the type of the Id within the edge.  Does this Id represent 
> a source Id, or does it represent a targetId?  The entity to be indexed will 
> implicitly be the opposite of the type specified.  I.E if it's a source edge, 
> the document is the target.  If it's a target edge, the document is the 
> source.
> These values should also be stored within our document, so that we can index 
> our documents.  Note that we perform bidirectional indexing in some cases, 
> such was users, groups etc.  When we do this, we need to ensure that mark the 
> direction of the edge appropriately.
> h2. Create a static mapping.  
> The mapping should contains the following static fields.
> * entityId - The entity id
> * entityVersion - The entity version
> * edgeId - The edge Id
> * edgeName - The edge name
> * edgeTimestamp - The edge timestamp
> * edgeType - source | target
> * searchEdge - edgeId + edgeName + edgeType
> It will then contain an array of "fields"  Each of these fields will have the 
> following formation.
> {code}
> { "name":"[entity field name], "[field type]":[field value}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to