You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: GetSearchFieldsAsync

GetSearchFieldsAsync is used to retrieve the list of all available field names to build a query.

Syntax

Task<string[]> GetSearchFieldsAsync(int start = 0, int pageSize = 1024);

Parameters
start int The number of results that should be skipped
pageSize int The maximum number of results that will be returned

Return Value
Task<string[]> A task that represents the asynchronous operation. The task result is the array of indexed field names.

Example

GetSearchFieldsAsync method returns all the indexed fields, so all the keys of built-in metadata (e.g. Etag), metadata provided by a user (e.g. Owner) and the default indexing fields (e.g __key or __fileName) will be included.

await store.AsyncFilesCommands.UploadAsync("intro.txt", stream, new RavenJObject() { { "Owner", "James" } });

var terms = await store.AsyncFilesCommands.GetSearchFieldsAsync();