OnDemand User Group

Support Forums => OD/WEK & JAVA API => Topic started by: affan on October 05, 2020, 08:54:56 AM

Title: Get total return count from a folder query without changing setting to unlimited
Post by: affan on October 05, 2020, 08:54:56 AM
Hi,

With ODWEK Api, are there ways to get total return count from a folder query without changing the folder properties setting to return unlimited?

Thanks.
Title: Re: Get total return count from a folder query without changing setting to unlimited
Post by: Justin Derrick on October 05, 2020, 09:06:10 AM
The setting is there for a reason -- you don't want someone to be able to turn it off.

Best bet is to do the queries on the individual application groups yourself to get around the Folder limitations for regular users.

-JD.
Title: Re: Get total return count from a folder query without changing setting to unlimited
Post by: affan on October 07, 2020, 06:42:43 AM
Thanks for the reply. Can you please elaborate on querying application groups? How can that be done and will that give the desired result? Currently we have MaxHits setting at 200. If a search for a given folder has 350 results, how can we find that out without changing the MaxHits setting?
Title: Re: Get total return count from a folder query without changing setting to unlimited
Post by: spond on October 07, 2020, 08:17:01 AM
You could use the ODFolder.searchCountHits() to get the count back. You wouldn't need to change anything in the folder setting or maxHits setting.
Title: Re: Get total return count from a folder query without changing setting to unlimited
Post by: Justin Derrick on October 07, 2020, 04:30:12 PM
+1 for spond...  This is the correct answer.  I clearly need to start reading the CMOD ODWEK manuals some more.  :)

-JD.