IRPCSearch.GetFacetValues

View as Markdown

Vault API / core read session or assertion idempotent returns metadata structure version

Retrieves the facet values for the documents that satisfy the specified search conditions.

ServiceSearch MFiles.IRPCSearch
gRPC method/MFiles.IRPCSearch/GetFacetValues
HTTP (mf-http-grpc)POST /grpc/v1/get-facet-values
RequestGetFacetValuesRequest
ResponseGetFacetValuesResponse
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

For search UIs that show facets (refiners) next to full-text search results. Facets are computed only when the vault's search index supports them (not with a dtSearch index) and the search has exactly one full-text (any-field) condition. Otherwise the call succeeds with empty data. The data string uses an internal format that the M-Files clients read; it is not described here.

Request: GetFacetValuesRequest

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.
search_condition_arrays[]repeated SearchConditionArrayExactly one condition array; all of its conditions must match. No array or more than one array fails with "Invalid search condition."
search_condition_arrays[].value[]repeated SearchConditionThe conditions. All of them must match.
search_condition_arrays[].value[].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_arrays[].value[].typeConditionTypeThe comparison operator.
search_condition_arrays[].value[].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.
facets_requested[]repeated ExpressionThe facets to compute, as expressions; for example an EXPRESSION_TYPE_PROPERTY_VALUE expression for property 100 (Class).
facets_requested[].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).
facets_requested[].dataExpressionUnionThe expression data. Set the member that matches type.
facets_requested[].data.property_valueExpressionUnion.PropertyValueData (oneof data)Expression for property values.
facets_requested[].data.id_segmentExpressionUnion.IdSegmentData (oneof data)Expression for document ID segments.
facets_requested[].data.status_valueExpressionUnion.StatusValueData (oneof data)Expression for status values such as Document ID or CheckedOutToUser.
facets_requested[].data.file_valueExpressionUnion.FileValueData (oneof data)Expression for file values such as file size.
facets_requested[].data.typed_valueExpressionUnion.TypedValueData (oneof data)Expression for values of specific data type. Lookup-typed values also specify the value list.
facets_requested[].data.any_fieldExpressionUnion.AnyFieldData (oneof data)Expression for values of any field (any property, file name etc.).
facets_requested[].data.permissionsExpressionUnion.PermissionsData (oneof data)Expression for permissions (ACL).
facets_requested[].indirection_levels[]repeated IndirectionLevelThe lookups to follow before evaluating the expression, from the searched object outwards. Empty evaluates the expression on the object itself.
facets_requested[].indirection_levels[].typeboolTrue if id is a property definition ID; false if it is an object type ID. An object type level follows a reference to an object of that type through any property.
facets_requested[].indirection_levels[].idint32The property definition ID or object type ID to follow.
max_facet_values_countuint32The maximum number of facet values returned for each facet. Use 0 to retrieve all facet values.
facetsearchflagsFACETSEARCHFLAGSFacet search flags. Ignored if bFacetMode is false.
facetsearchflags.allboolSpecifies all flags set; Including any future flags.
facetsearchflags.enabledboolFacet search is enabled.
facetsearchflags.ignore_search_permissionsboolNo ACL check on facet search.
facetsearchflags.ignore_group_permissionsboolNo ACL check on facet groups.
facetsearchflags.ignore_value_permissionsboolNo ACL check on individual facet values.
facetsearchflags.sort_facetsboolSort facet values in descending occurrence order within each facet group.
facetsearchflags.ascending_orderboolIf SortFacetValues is present, sort facet values in ascending occurrence order within each facet group.
facet_filterStringValueIf set, specifies the additional facet search filter.
facet_filter.valuestringString.

Response: GetFacetValuesResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
datastringReceives the facet values as string data. Use CData_FacetValues to inspect the data.
psearchstatusflagsSEARCHSTATUSFLAGSReceives search status flags.
psearchstatusflags.allboolSpecifies all flags set; Including any future flags.
psearchstatusflags.multiphase_object_type_search_neededboolMulti-phase OT search is needed.
psearchstatusflags.wildcard_expansion_limit_exceededboolWildcard expansion limit has been exceeded (but some results has been returned anyway).
psearchstatusflags.may_contain_stale_databoolData returned by search may be out of date.
psearchstatusflags.resorted_to_default_sortboolRequested sorting is not supported and result set was established using the default sorting (relevance).
psearchstatusflags.resorted_to_default_sort_too_many_resultsboolRequested sorting is not supported and result set was established using the default sorting (relevance) because there are too many matching results for sorting.
psearchstatusflags.sorted_by_engineboolData returned by search was sorted by the engine (Global Sorting).
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.