Hi,
So I recently realised that a normal FindDocumentsByQuery call limits the amount of results to 100 so I am trying to work out a way to get all the documents that match a particular query.
I am currently trying to use FindDocumentsByQueryWithPaging and have run into a few things that I've noticed...
1) Whatever value I set for the "max" param is of course how many documents I receive however storage.GetRecordCount() will return the same value (unless there are fewer records. If I have 150 records and "max" is set to 100, storage.GetRecordCount() tells me there are 100 records. How do I get it to tell me if there are more records that have not been loaded?
2) How would I then go about loading the next page of records? I have attempted to call FindDocumentsByQueryWithPaging() within the callback of the first - using exactly the same params except incrementing the offset by jsonDocList.Count. It seems like this should work but I get the following error when I try (not that the line number #1628 corresponds to where I attempt to call FindDocumentsByQueryWithPaging() within the CallBack:
system.NullReferenceException: Object reference not set to an instance of an object
at SessionSupervisor+PagedScoreUpdateCallBack.OnSuccess (System.Object response) [0x00480] in /Users/Anthony/SourceTree Repos/Unity/LootSpace/Assets/LootAssets/Scripts/User Data/SessionSupervisor.cs:1628
at com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW.BuildResponseForObjectService (System.String successValue, App42CallBack callBacK, System.String resource) [0x00000] in <filename unknown>:0
at com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorWWW+<Execute>d__6.MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.Debug:LogError(Object)