IRPCSearch.GetSearchHits

View as Markdown

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.

ServiceSearch MFiles.IRPCSearch
gRPC method/MFiles.IRPCSearch/GetSearchHits
HTTP (mf-http-grpc)POST /grpc/v1/get-search-hits
RequestGetSearchHitsRequest
ResponseGetSearchHitsResponse
Book and levelVault API, core
Kindread
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentyes
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (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.

FieldTypeDescription
search_optionsSearchTargetSearch options.
search_options.indexstringThe 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.modeSearchModeWhether 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_storageboolTrue to also search objects kept in Master Storage, where the vault supports it.
search_options.continuation_tokenstringContinuation 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.
inputstringThe source text for searching.
search_conditionSearchConditionThe full-text search condition that specifies the search words (Represented by SearchCondition sturct).
search_condition.expressionExpressionThe 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.typeExpressionTypeThe 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.dataExpressionUnionThe expression data. Set the member that matches type.
search_condition.expression.indirection_levels[]repeated IndirectionLevelThe lookups to follow before evaluating the expression, from the searched object outwards. Empty evaluates the expression on the object itself.
search_condition.typeConditionTypeThe comparison operator.
search_condition.valueTypedValueThe 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_valueboolTrue if the value is empty. data is then unset.
search_condition.value.typeDatatypeThe data type of the value.
search_condition.value.dataTypedValueUnionThe 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.

FieldTypeDescription
hits[]repeated stringReceives the hit strings.
search_output_infoSearchOutputInfoAdditional information about the completed search operation.
search_output_info.processing_time_at_engine_in_millisecondsint32The processing time at the search engine, in milliseconds. -1 if not known.
search_output_info.processing_time_at_engine_from_mfserver_in_millisecondsint32The 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_millisecondsint32The total processing time at MFServer, in milliseconds. -1 if not known.
search_output_info.processing_time_at_mfserver_from_client_in_millisecondsint32The total processing time at MFServer, including network roundtrip from the client, in milliseconds. -1 if not known.