You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by GERey <gi...@git.apache.org> on 2015/05/13 21:31:15 UTC

[GitHub] incubator-usergrid pull request: Usergrid 607

GitHub user GERey opened a pull request:

    https://github.com/apache/incubator-usergrid/pull/246

    Usergrid 607

    https://issues.apache.org/jira/browse/USERGRID-607

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-usergrid USERGRID-607

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-usergrid/pull/246.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #246
    
----
commit b52ac2f47d918a3390fd2bc65fbd543c2e78067a
Author: GERey <gr...@apigee.com>
Date:   2015-05-13T19:26:58Z

    Added tests for usergrid 607 and other issues were fixed in previous releases.
    Added new method that gets all edge documents out of elastic search and returns them.
    Added comment to IndexEdge about the differentiation between IndexEdge and SearchEdge.
    Removed the timeout in EsIndexBufferConsumerImpl.

commit 79aea6ab9716966235b01b2aa4969862003e557a
Author: GERey <gr...@apigee.com>
Date:   2015-05-13T19:27:50Z

    Fixed naming mismatch in CandidateResults.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 607

Posted by GERey <gi...@git.apache.org>.
Github user GERey closed the pull request at:

    https://github.com/apache/incubator-usergrid/pull/246


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 607

Posted by GERey <gi...@git.apache.org>.
Github user GERey commented on the pull request:

    https://github.com/apache/incubator-usergrid/pull/246#issuecomment-105622635
  
    This is being rolled into usergrid-608 since there are changes there that affect the scope of USERGRID-607



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-usergrid pull request: Usergrid 607

Posted by tnine <gi...@git.apache.org>.
Github user tnine commented on a diff in the pull request:

    https://github.com/apache/incubator-usergrid/pull/246#discussion_r30270165
  
    --- Diff: stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java ---
    @@ -163,16 +168,54 @@ public IndexServiceImpl( final GraphManagerFactory graphManagerFactory, final En
         }
     
     
    +    //Steps to delete an IndexEdge.
    +    //1.Take the search edge given and search for all the edges in elasticsearch matching that search edge
    +    //2. Batch Delete all of those edges returned in the previous search.
    +    //TODO: optimize loops further.
         @Override
         public Observable<IndexOperationMessage> deleteIndexEdge( final ApplicationScope applicationScope,
                                                                   final Edge edge ) {
     
    +        final Observable<IndexOperationMessage> batches =
    +            Observable.just( edge ).flatMap( edgeValue -> {
    +                final ApplicationEntityIndex ei = entityIndexFactory.createApplicationEntityIndex( applicationScope );
    +                EntityIndexBatch batch = ei.createBatch();
     
    -        //TODO, query ES and remove this edge
     
    -        throw new NotImplementedException( "Implement me" );
    -    }
    +                //review why generating the Scope from the Source  and the target node makes sense.
    +                final IndexEdge fromSource = generateScopeFromSource( edge );
    +                final Id targetId = edge.getTargetNode();
    +
    +
    +                CandidateResults targetEdgesToBeDeindexed = ei.getAllEdgeDocuments( fromSource, targetId, 1000, 0 );
    --- End diff --
    
    Can you instead refactor this to use Functional?  This way we have 1 type of implementation, and the codebase becomes more consistent.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---