[
https://issues.apache.org/jira/browse/OAK-9319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vishnu Aggarwal updated OAK-9319:
---------------------------------
Description:
Is there a way to return the count of nodes for a given search query having
different filtering clauses in a way, mimicking what we are able to do in an
RDBMS query for eg., select count(*) from table_name where <condition> <and/or>
<condition>;
Can this be replicated in OAK without having to fetch all nodes in memory and
calculating the count of all nodes?
What the use case is to draw pagination.
Let say, we are searching for 10(limit) nodes at a time. For that we use
setLimit() and setOffset() on the query object.
Also, we need the count of all nodes for that particular query to draw up the
pages on front-end. For that, we have to make another search without the limit
and offset, fetching all the nodes in memory and then making the count.
But what it seems is, fetching all nodes takes up a lot of time ~ 1 min on the
server. Instead of that, we are directly able to query to return the count of
nodes. That will prove beneficial and quicker way
was:
Is there a way to return the count of nodes for a given search query having
different filtering clauses in a way, mimicking what we are able to do in an
RDBMS query for eg., select count(*) from table_name where <condition> <and/or>
<condition>;
Can this be replicated in OAK without having to fetch all nodes in memory and
then calculating the count of all nodes?
> Returning the count of nodes based on search query
> --------------------------------------------------
>
> Key: OAK-9319
> URL: https://issues.apache.org/jira/browse/OAK-9319
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: oak-search, query
> Reporter: Vishnu Aggarwal
> Priority: Critical
>
> Is there a way to return the count of nodes for a given search query having
> different filtering clauses in a way, mimicking what we are able to do in an
> RDBMS query for eg., select count(*) from table_name where <condition>
> <and/or> <condition>;
>
> Can this be replicated in OAK without having to fetch all nodes in memory and
> calculating the count of all nodes?
>
> What the use case is to draw pagination.
> Let say, we are searching for 10(limit) nodes at a time. For that we use
> setLimit() and setOffset() on the query object.
> Also, we need the count of all nodes for that particular query to draw up the
> pages on front-end. For that, we have to make another search without the
> limit and offset, fetching all the nodes in memory and then making the count.
> But what it seems is, fetching all nodes takes up a lot of time ~ 1 min on
> the server. Instead of that, we are directly able to query to return the
> count of nodes. That will prove beneficial and quicker way
--
This message was sent by Atlassian Jira
(v8.3.4#803005)