Enonic version: 6.5.4
I’m looking for a way to return all content in a query. I tried count -1, and it seems to work.
This is not documented though. I would like to know if this is a feature or a “feature” that will disappear in the future.
Documentation for reference:
Well, its what we use internally to flag fetch everything. I think it will be safe to use, any changes will be added to backward compatibility-list.
Its could of course a bit sketchy to return everything, but if you know that you will never get a million entries you should be ok. A safer approach will be to first send a query with count 0, get the total from the result and then use that total as count if its within a sensible limit, else page.