IRPCSearch.GetSearchHits
Vault API / core read session or assertion idempotent returns metadata structure version
Finds the words of a text that a full-text search condition matches, for hit highlighting.
| Service | Search MFiles.IRPCSearch |
|---|---|
| gRPC method | /MFiles.IRPCSearch/GetSearchHits |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-search-hits |
| Request | GetSearchHitsRequest |
| Response | GetSearchHitsResponse |
| Book and level | Vault API, core |
| Kind | read |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
search_condition must be an EXPRESSION_TYPE_ANY_FIELD condition with CONDITION_TYPE_CONTAINS
and a text value; anything else fails with "The parameter is incorrect." The server always
matches any of the search words, also for an all-words or Boolean search. hits lists the matched
words as they appear in input, for example "invoices" for the search word "invoice".
Request: GetSearchHitsRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
search_options | SearchTarget | Search options. |
search_options.index | string | The name of the search index to use. Empty uses the vault's default index. An unknown name fails with "Target index is not available." |
search_options.mode | SearchMode | Whether to prefer, require or avoid the full-text search engine. See SearchMode.Values: SEARCH_MODE_DEFAULT (0), SEARCH_MODE_FAVOR_FULL_TEXT_SEARCH (1), SEARCH_MODE_REQUIRE_FULL_TEXT_SEARCH (2), SEARCH_MODE_REQUIRE_DATABASE_SEARCH (3). |
search_options.search_master_storage | bool | True to also search objects kept in Master Storage, where the vault supports it. |
search_options.continuation_token | string | Continuation token for paging results from Master Storage. SearchObjects does not support it and fails with "Continuation token is not supported." when it is set together with search_master_storage. |
input | string | The source text for searching. |
search_condition | SearchCondition | The full-text search condition that specifies the search words (Represented by SearchCondition sturct). |
search_condition.expression | Expression | The left side of the condition: what is evaluated for each object, such as a property value, a status value or any field (full-text search). |
search_condition.expression.type | ExpressionType | The kind of expression. Must match the member set in data.Values: EXPRESSION_TYPE_UNINITIALIZED (0), EXPRESSION_TYPE_PROPERTY_VALUE (1), EXPRESSION_TYPE_ID_SEGMENT (2), EXPRESSION_TYPE_STATUS_VALUE (3), EXPRESSION_TYPE_FILE_VALUE (4), EXPRESSION_TYPE_TYPED_VALUE (5), EXPRESSION_TYPE_ANY_FIELD (6), EXPRESSION_TYPE_PERMISSIONS (7). |
search_condition.expression.data | ExpressionUnion | The expression data. Set the member that matches type. |
search_condition.expression.indirection_levels[] | repeated IndirectionLevel | The lookups to follow before evaluating the expression, from the searched object outwards. Empty evaluates the expression on the object itself. |
search_condition.type | ConditionType | The comparison operator. |
search_condition.value | TypedValue | The right side of the condition: the value to compare with. Its data type must suit the expression, for example a lookup for a lookup property, Boolean for STATUS_TYPE_IS_DELETED. |
search_condition.value.is_null_value | bool | True if the value is empty. data is then unset. |
search_condition.value.type | Datatype | The data type of the value. |
search_condition.value.data | TypedValueUnion | The value, in the member that matches type. Unset for an empty value. |
Response: GetSearchHitsResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
hits[] | repeated string | Receives the hit strings. |
search_output_info | SearchOutputInfo | Additional information about the completed search operation. |
search_output_info.processing_time_at_engine_in_milliseconds | int32 | The processing time at the search engine, in milliseconds. -1 if not known. |
search_output_info.processing_time_at_engine_from_mfserver_in_milliseconds | int32 | The processing time at the search engine, including network roundtrip from MFServer, in milliseconds. -1 if not known. |
search_output_info.processing_time_at_mfserver_in_milliseconds | int32 | The total processing time at MFServer, in milliseconds. -1 if not known. |
search_output_info.processing_time_at_mfserver_from_client_in_milliseconds | int32 | The total processing time at MFServer, including network roundtrip from the client, in milliseconds. -1 if not known. |