IRPCSearch.GetObjectCountInSearch
Vault API / core read session or assertion idempotent returns metadata structure version
Counts the objects that match the given conditions without returning them.
| Service | Search MFiles.IRPCSearch |
|---|---|
| gRPC method | /MFiles.IRPCSearch/GetObjectCountInSearch |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-object-count-in-search |
| Request | GetObjectCountInSearchRequest |
| Response | GetObjectCountInSearchResponse |
| 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
Takes the same conditions as SearchObjects and counts
the same objects: latest versions the caller can see, deleted objects included unless excluded by a
condition. The result is one count for all object types together. The count stops at 10,000 by
default (a vault setting); a larger count is reported with SRCOUNTFLAGS.more_than. No search
timeout is applied.
Request: GetObjectCountInSearchRequest
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 |
|---|---|---|
callimp | CallImportance | The importance level of this call. Typically CALL_IMPORTANCE_NORMAL.Values: CALL_IMPORTANCE_DEFAULT (0), CALL_IMPORTANCE_NORMAL (1), CALL_IMPORTANCE_CAN_BE_REJECTED (2). |
search_options | SearchTarget | The search index and search mode. Leave unset for the vault's default index. |
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. |
search_condition_arrays[] | repeated SearchConditionArray | Exactly one condition array; all of its conditions must match. No array or more than one array fails with "The parameter is incorrect." |
search_condition_arrays[].value[] | repeated SearchCondition | The conditions. All of them must match. |
search_condition_arrays[].value[].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_arrays[].value[].type | ConditionType | The comparison operator. |
search_condition_arrays[].value[].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. |
searchflags | SearchFlags | Search flags. look_in_all_versions and return_latest_visible_version are not supported and fail with "Invalid search condition." |
searchflags.all | bool | All flags set, including any future flags. Do not use in searches. |
searchflags.look_in_all_versions | bool | Also match older versions; each object is returned once. Cannot be combined with sorting, and GetObjectCountInSearch rejects it. |
searchflags.return_latest_visible_version | bool | Return the latest visible version for each matching document. |
searchflags.separately_search_in_each_object_type | bool | Search each object type separately and merge the results. The limit then applies to each object type, and pages_with_more_results lists the object types whose results were cut. |
searchflags.allow_quick_refresh_for_external_object_types | bool | If a search with an external ID condition on an external object type finds nothing, refresh the object type from its external database and search again. |
searchflags.disable_relevancy_ranking | bool | Do not rank the results by relevance. |
searchflags.separately_search_specific_object_types | bool | Allows only specified object types to be searched separately. |
searchflags.include_unmanaged_objects | bool | Extends the search to include unmanaged objects. |
searchflags.individual_limit_for_each_external_repository | bool | Ensures that up to the specified maximum number of results are returned from each repository. |
Response: GetObjectCountInSearchResponse
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 |
|---|---|---|
psrcountarr[] | repeated SearchResultsCount | One count, with group_id -100 (all object types). flags.exact_measure means count is exact; flags.more_than means more objects match than count. |
psrcountarr[].group_id | int32 | The group that was counted: an object type ID, or -100 for all object types. |
psrcountarr[].flags | SRCOUNTFLAGS | How to read count: exact_measure if exact, more_than if more objects match. |
psrcountarr[].flags.all | bool | Specifies all flags set; Including any future flags. |
psrcountarr[].flags.exact_measure | bool | If available, the reported result count is an exact measure. |
psrcountarr[].flags.more_than | bool | If available, the reported result count is not an exact measure but it indicates that an exact count is more than the reported count. |
psrcountarr[].flags.multi_phase_initial | bool | If available, the reported result count is based on the added items only. |
psrcountarr[].flags.multi_phase_count_only | bool | If available, the reported result count is to be associated with a group without actual results. |
psrcountarr[].flags.multi_phase | bool | If available, the reported result count supports multi-phase search, and it is to be associated with the initial result count rather than the total count. |
psrcountarr[].flags.additional_items | bool | Identifies a search results count. |
psrcountarr[].count | uint32 | The number of matching objects. |
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. |
Related methods
- SearchObjects -- Searches the vault for objects that match the given conditions.