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 "Joerg Hoh (Jira)" <ji...@apache.org> on 2024/07/16 16:20:00 UTC
[jira] [Updated] (OAK-10956) Improve Row.getPath()
[ https://issues.apache.org/jira/browse/OAK-10956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joerg Hoh updated OAK-10956:
----------------------------
Description:
Assuming that I have this code to read just the path of all search results:
{noformat}
List<String> foundPaths = new ArrayList<>();
QueryResult qr = query.execute(...);
RowIterator iter = qr.getRows();
while (iter.hasNext) {
Row r = iter.nextRow();
foundPaths.add(r.getPath());
}
{noformat}
We have found that {{r.getPath()}} still resolves a {{Tree}}, while {{r.getValue("jcr:path").toString()}} returns the same result, but without resolving a {{Tree}}.
I suggest that we change the implementation of {{getPath()}} (without parameters) to use the same approach; this would avoid quite some repository overhead.
//CC [~angela]
was:
Assuming that I have this code to read just the path of all search results:
{noformat}
List<String> foundPaths = new ArrayList<>();
QueryResult qr = query.execute(...);
RowIterator iter = qr.getRows();
while (iter.hasNext) {
Row r = iter.nextRow();
foundPaths.add(r.getPath());
}
{noformat}
We have found that {{r.getPath}} still resolves a {{Tree}}, while {{r.getValue("jcr:path").toString()}} returns the same result, but without resolving a {{Tree}}.
I suggest that we change the implementation of {{getPath()}} (without parameters) to use the same approach; this would avoid quite some repository overhead.
//CC [~angela]
> Improve Row.getPath()
> ---------------------
>
> Key: OAK-10956
> URL: https://issues.apache.org/jira/browse/OAK-10956
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: indexing
> Reporter: Joerg Hoh
> Priority: Major
>
> Assuming that I have this code to read just the path of all search results:
> {noformat}
> List<String> foundPaths = new ArrayList<>();
> QueryResult qr = query.execute(...);
> RowIterator iter = qr.getRows();
> while (iter.hasNext) {
> Row r = iter.nextRow();
> foundPaths.add(r.getPath());
> }
> {noformat}
> We have found that {{r.getPath()}} still resolves a {{Tree}}, while {{r.getValue("jcr:path").toString()}} returns the same result, but without resolving a {{Tree}}.
> I suggest that we change the implementation of {{getPath()}} (without parameters) to use the same approach; this would avoid quite some repository overhead.
> //CC [~angela]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)