Search (IRPCSearch)
An interface for performing searches.
All search operations can be done via this interface.
| gRPC service | MFiles.IRPCSearch |
|---|---|
| Book and level | Vault API, core |
| Methods | 14 |
| Proto file | mfiles/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.
- Only objects the caller is allowed to see: the same search returns fewer objects for a normal user than for a vault administrator.
- Deleted objects too, for callers who may see deleted objects (vault administrators, for
example), unless the array contains the "not deleted" condition: a
STATUS_TYPE_IS_DELETEDstatus valueCONDITION_TYPE_EQUALto Booleanfalse. Add it to every search. - One version per object: the latest checked-in version, or the checked-out version when the object is checked out to the caller.
- Object and version information without the property values. Read the properties with GetObjectVersionAndPropertiesOfMultipleObjects.
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
| Method | Summary | Facts |
|---|---|---|
| SearchObjects | Searches the vault for objects that match the given conditions. | read session or assertion idempotent returns metadata structure version |
| GetObjectCountInSearch | Counts the objects that match the given conditions without returning them. | read session or assertion idempotent returns metadata structure version |
| GetFacetValues | Retrieves the facet values for the documents that satisfy the specified search conditions. | read session or assertion idempotent returns metadata structure version |
| GetFolderContents | Lists 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
| Method | Summary | Facts |
|---|---|---|
| CreateSummarization | Creates an Aino summary for the M-Files clients. | write session or assertion idempotent returns metadata structure version |
| GetFolderContentsOfPinboard | Gets the contents of the Pinboard items. | write session or assertion returns metadata structure version |
| GetFolderContentsOrDelta | Gets 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 |
| GetFolderObjectsCount | Gets the count of objects in the specified folder. | read session or assertion idempotent returns metadata structure version |
| GetObjectsCountForNotifications | Gets the objects count for notification badge. | read session or assertion idempotent |
| GetPrefillProperties | Gets the property values that a new object created in the given folder gets from that folder. | read session or assertion idempotent |
| GetSearchHits | Finds the words of a text that a full-text search condition matches, for hit highlighting. | read session or assertion idempotent returns metadata structure version |
| QuerySearchAgent | Runs an Aino Search query for the M-Files clients. | read session or assertion idempotent returns metadata structure version |
| SearchReferencedValueListItems | Gets 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 |
| SearchViewLevelFolders | The 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 |