You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/06/16 10:04:00 UTC

[jira] [Commented] (OAK-6355) Usage of NodeAggregator creates cyclic dependency between oak.spi.query and oak.plugins.index.*

    [ https://issues.apache.org/jira/browse/OAK-6355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16051713#comment-16051713 ] 

Thomas Mueller commented on OAK-6355:
-------------------------------------

Could we move it directly to the QueryIndex interface? We don't plan to use that anywhere else (in fact, aggregation at query time, which uses this interface, is no longer the default, and is rarely used).

{noformat}
--- src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java	(revision 1798669)
+++ src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java	(working copy)
@@ -19,6 +19,7 @@
 package org.apache.jackrabbit.oak.spi.query;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -28,7 +29,6 @@
 
 import com.google.common.collect.Maps;
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.index.aggregate.NodeAggregator;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 import static org.apache.jackrabbit.oak.spi.query.Filter.PropertyRestriction;
@@ -150,6 +150,12 @@
         NodeAggregator getNodeAggregator();
 
     }
+    
+    public interface NodeAggregator {
+
+        Iterator<String> getParents(NodeState rootState, String path);
+
+    }    
 
     public interface AdvanceFulltextQueryIndex extends FulltextQueryIndex, AdvancedQueryIndex {
         // a marker interface
{noformat}

Plus relevant import changes in oak-core and oak-lucene; possibly also oak-solr.

Would that work for you?

> Usage of NodeAggregator creates cyclic dependency between oak.spi.query and oak.plugins.index.*
> -----------------------------------------------------------------------------------------------
>
>                 Key: OAK-6355
>                 URL: https://issues.apache.org/jira/browse/OAK-6355
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, indexing, query
>            Reporter: angela
>
> As mentioned in OAK-6304 I had an another look at the dependencies of the _oak.spi.query_ packages space and found a single dependency on _oak.plugins.index.*_: 
> {{QueryIndex.FulltextQueryIndex.getNodeAggregator}} returns a {{org.apache.jackrabbit.oak.plugins.index.aggregate.NodeAggregator}}.
> As far as I could see this is the only dependency left within the _oak.spi.query_ package pointing to interfaces/classes inside _oak-core_.
> [~tmueller], would it be possible to move the {{org.apache.jackrabbit.oak.plugins.index.aggregate.NodeAggregator}} interface to some package below _oak.spi.query_ or a potential (new) _oak.spi.index_? wdyt?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)