Search (IRPCSearch)

View as Markdown

An interface for performing searches.

All search operations can be done via this interface.

gRPC serviceMFiles.IRPCSearch
Book and levelVault API, core
Methods14
Proto filemfiles/IRPCSearch.proto

Overview

Use this service to find objects by conditions, to count them, and to browse views the way the M-Files clients do.

Job Method
Find objects that match conditions SearchObjects
Count matching objects without fetching them GetObjectCountInSearch
Browse views, view levels and their objects GetFolderContents
Facet counts for a full-text search UI GetFacetValues

The other methods serve specific M-Files client features (hit highlighting, listing counts, notification badges, pinboard, Aino Search and summaries).

Condition model. A search is a SearchConditionArray; all of its conditions must match (AND). SearchObjects and GetObjectCountInSearch accept exactly one array: an empty request or two or more arrays fail with "The parameter is incorrect." To match one of several values of a lookup, use CONDITION_TYPE_EQUAL with a multi-select lookup value that lists them; for other OR cases, run one search per alternative. An array with no conditions matches every object the caller can see.

What a search returns.

Limits and timeouts. In SearchObjects, limit and timeout_in_seconds left at 0 mean no limit and no timeout; the server does not apply a default. Set both. A vault administrator can configure forced maxima that cap both values. GetObjectCountInSearch counts up to 10,000 objects by default and reports larger counts as "more than".

Errors. Search errors arrive with gRPC status UNKNOWN and the M-Files error message as the status details, for example "Invalid search condition." for a condition the server cannot evaluate.

The Search concept shows the conditions you need most as complete messages, and the paging guide reads a large result set page by page.

Highlighted methods

MethodSummaryFacts
SearchObjectsSearches the vault for objects that match the given conditions.read session or assertion idempotent returns metadata structure version
GetObjectCountInSearchCounts the objects that match the given conditions without returning them.read session or assertion idempotent returns metadata structure version
GetFacetValuesRetrieves the facet values for the documents that satisfy the specified search conditions.read session or assertion idempotent returns metadata structure version
GetFolderContentsLists the contents of a view or a view level: subviews, grouping folders and objects.read session or assertion idempotent returns metadata structure version

Other methods

MethodSummaryFacts
CreateSummarizationCreates an Aino summary for the M-Files clients.write session or assertion idempotent returns metadata structure version
GetFolderContentsOfPinboardGets the contents of the Pinboard items.write session or assertion returns metadata structure version
GetFolderContentsOrDeltaGets the contents of the specified folder, or a delta that indicates changes to document vault data since the logical timestamp known by the caller.read session or assertion idempotent returns metadata structure version
GetFolderObjectsCountGets the count of objects in the specified folder.read session or assertion idempotent returns metadata structure version
GetObjectsCountForNotificationsGets the objects count for notification badge.read session or assertion idempotent
GetPrefillPropertiesGets the property values that a new object created in the given folder gets from that folder.read session or assertion idempotent
GetSearchHitsFinds the words of a text that a full-text search condition matches, for hit highlighting.read session or assertion idempotent returns metadata structure version
QuerySearchAgentRuns an Aino Search query for the M-Files clients.read session or assertion idempotent returns metadata structure version
SearchReferencedValueListItemsGets value list items that are referenced by one or more documents (possibly limiting the set of documents with conditions) in ID order.write session or assertion
SearchViewLevelFoldersThe search covers the folders that the listing of the level would show without the folder limit. The results can be saved as part of the user's folder selection. Fails with E_NOTIMPL when the feature is not enabled on the server.read session or assertion idempotent returns metadata structure version