Another great feature offered by the session is the querying support. The Query method is an entry point to build a query that will be used to look for files on a file system according to the specified criteria.
Instance implementing IAsyncFilesQuery interface containing additional query methods and extensions.
The Query method returns an object that allows you to construct a query by using available predicates and logical operators.
In order to get the results you need to materialize the query by using one of the following methods:
The querying API is the same as the rest of RavenFS client methods, which means it exposes only the asynchronous methods.
Default page size
The default value of a page size for a query is 1024 results. In order to retrieve a different number of results in a single query use the .Take(pageSize) method.
If there are fewer than 1024 files in a file system, the below code will return all of them because the query does not contain any filtering condition. If there are more than 1024 files, it will return only the first 1024 results according to the default value of the pageSize parameter.