jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-6578) Enhance the IndexStoreStrategy to return list of matching values and paths
Date Mon, 04 Sep 2017 10:57:02 GMT

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

Chetan Mehrotra edited comment on OAK-6578 at 9/4/17 10:56 AM:
---------------------------------------------------------------

bq. would it make sense to keep the new queryEntries method in the IndexStoreStrategy interface
or should I try to keep it in the unique store implementation?

Would prefer later i.e. keep it in unique store impl otherwise later we may use this api in
wrong context. Checking the code in the git branch

{noformat}
+            Set<IndexStoreStrategy> strategies = Multiplexers.getStrategies(true, indexEntry.getKey().isDefault()
? Mounts.defaultMountInfoProvider() : ctx.getMountInfoProvider(), indexNode, INDEX_CONTENT_NODE_NAME);
+            Set<IndexStoreStrategy> strategies2 = Multiplexers.getStrategies(true,
indexEntry2.getKey().isDefault() ? Mounts.defaultMountInfoProvider() : ctx.getMountInfoProvider(),
indexNode2, INDEX_CONTENT_NODE_NAME);
+
+            // TODO - will be very slow for large indexes, will need to write entries to
file, sort and compare - see the VersionGarbageCollector implementation - ExternalSort, StringSort
+            for ( IndexStoreStrategy strategy : strategies ) {
+                for ( IndexEntry hit : strategy.queryEntries(Filter.EMPTY_FILTER, indexName,
indexNode, null) ) {
+                    if ( !indexEntry.getKey().isMounted(hit.getPath() )) {
+                        continue;
+                    }
{noformat}

Here you can bypass Multiplexers and instead directly create the unique strategy (as code
is only supposed to work for that) and use the new api. or have FilteringIndexStoreStrategy
expose the delegate with all castings involved. Which should be ok


was (Author: chetanm):
bq. would it make sense to keep the new queryEntries method in the IndexStoreStrategy interface
or should I try to keep it in the unique store implementation?

Would prefer later i.e. keep it in unique store impl otherwise later we may use this api in
wrong context. Checking the code in the git branch

{noformat}

> Enhance the IndexStoreStrategy to return list of matching values and paths
> --------------------------------------------------------------------------
>
>                 Key: OAK-6578
>                 URL: https://issues.apache.org/jira/browse/OAK-6578
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: indexing
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>             Fix For: 1.8, 1.7.7
>
>         Attachments: OAK-6578.patch
>
>
> For OAK-6506 I would need to extract from each index a list of all property values and
paths. The property values would be used to check for duplicates, while the paths will be
used for reporting.
> As the IndexStoreStrategy interface and its implementations do not support such access,
we need to provide it.



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

Mime
View raw message