November Happy Hour will be moved to Thursday December 5th.

Is there a way to do a Count() query in ImageVault 4

Vote:
 

Hi,

Is there any way in ImageVault 4(.7) to do some sort of 'COUNT' query using the ImageVault API?
We've implemented paging by using the 'Skip' and 'Take' implementations as described here: http://imagevault.se/en/documentation/api-documentation/?page=csharp/examples/querying-mediaitems/querymedia.html and this seems to work properly.
Now we would also like to know the total amount of items found when not using paging. The only way I found to do it is to fetch all items and do a 'Count()' on the fetched collection.
Is their a proper way of doing it using the ImageVault API?

Regards,

Robert.

#122561
Jun 05, 2015 10:35
Vote:
 

I don't think it's possible.

One thing we've done a few times when needing better querying and searching capabilities is regularly exporting MediaItem objects to Find.

#122581
Jun 05, 2015 14:21
Vote:
 

As you write you can do a count on the fetched items. But you can't get that information without fetching them first.

You can however query statistics for specific vaults and get information about number of items in that vault.

http://imagevault.se/en/documentation/api-documentation/?page=csharp/examples/queryvault.html

#122630
Jun 08, 2015 16:20
Vote:
 

Thanks for your replies! Querying for Vault statistics seems usefull, however we need statistics based on one or more categories.

#122735
Jun 11, 2015 12:07
Vote:
 

To get the number of items for categories you will need to fetch the items for that category/categories first and then do a count.

#122940
Jun 18, 2015 12:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.