Hi

We are pragmatic here.

If you are using SOLR and have any-deny-denies turned off you should get
the  total number.
Any other case you will not.

If you use the DB or lucene or SOLR+any-deny-denies some or all permission
enforcement is done post query.

If you do
Select * from cmis:document
and you have 100M docs in your repo do you want to do 100M acl evals ?
We do enough to fulfil the page and see if there is one more.

Querying with SOLR can do permission evaluation in query.

You can choose the configuration options where this will work.
It is not the default.

Andy

-----Original Message-----
From: Mark Streit [mailto:[email protected]]
Sent: 18 March 2014 16:42
To: [email protected]
Subject: Re: getTotalNumItems() returning wrong value

We ran into a similar issue with the method: getTotalNumItems() -  (using
Alfresco 4.1.7) and I believe this has been reported to them already.  You
may wish to check with Alfresco.

Mark Streit

On Tue, Mar 18, 2014 at 12:37 PM, Sebastian Danninger <
[email protected]> wrote:

> Dear all,
>
> performing the following Code:
>
> OperationContext oc = s.createOperationContext();
> oc.setMaxItemsPerPage(size); ItemIterable<QueryResult> results =
> s.query("SELECT cmis:objectId FROM cmis:folder WHERE
> cmis:createdBy="admin" ORDER BY cmis:createdBy ASC", false, oc);
> System.out.println("Total: " + results.getTotalNumItems());
>
> this always prints the same value as size (pagesize - 5) but should
> actually give the number of total query results (300+).
>
> Is this a general bug or somehow related to my repository (Alfresco)
>
> thanks
>
> Sebastian
>

Reply via email to