Count what a search matches, and the facets of the matches.
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Needs Search Document Metadata for total_count and View Search Facets for facets and facet_values, as the Portal's count and facet routes do. The Search app's total, filter panel and filter-list lookup for one query. query, weights, facet_filters, document_number_prefixes, reference_numbers, date_ranges and exclude_duplicates are the members of POST /documents/search that its Search app engine reads. include lists what to compute: total_count (the number of documents the caller can read that match), facets (the matches counted by each facet, the most frequent values first, and by month of the document date); both by default. facet_values asks for one facet's values containing a text, with the facet's own filter set aside so another value of the same list can be found. A facet value returned here is a value facet_filters takes. A large organisation's facets are estimated from a sample: is_approximate says so.
| スコープ | documents:search |
| 非同期 | いいえ |
| MCP ツール | aggregate_documents |
| 会社に必要な機能 | search |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | DocumentAggregateQueryInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
200 | Success. | application/json DocumentAggregate |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | unsupported_for_tenant, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
AggregateFacetValuesInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
contains | string または null | 任意 | Only the values containing this text, ignoring case. |
facet | string | 必須 | The facet whose values to list: one of the names facet_filters takes. |
DocumentAggregate
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
document_date_months | FacetBucket の配列 | 必須 | The matches per month of their document date, value YYYY-MM, oldest first; empty when include leaves facets out. |
facet_values | FacetValues または null | 必須 | The facet_values asked for; null when none was. |
facets | FacetCounts の配列 | 必須 | The matches counted by each facet; empty when include leaves facets out. |
is_approximate | boolean または null | 必須 | The facet counts were estimated from a sample of a large organisation's documents and scaled up: a rare value may be missing. Null when facets were not computed. |
total_count | integer または null | 必須 | The documents the caller can read that match; null when include leaves it out. |
truncated_facets | string の配列 | 必須 | The facets that have more values than were listed. |
DocumentAggregateQueryInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
date_ranges | SearchDateRangeInput の配列 | 任意 | Keep the documents whose dates fall in every range. |
document_number_prefixes | string の配列 | 任意 | Keep the documents whose number starts with one of these, ignoring case. |
exclude_duplicates | boolean または null | 任意 | Hide the documents that duplicate another document's number. |
facet_filters | SearchFacetFilterInput の配列 | 任意 | Keep the documents whose folder, tag, location, file author and so on hold one of the values. The values are the ones POST /documents/aggregate lists. |
facet_values | AggregateFacetValuesInput または null | 任意 | List the values of one facet that contain a text. |
include | string の配列 | 任意 | What to compute: total_count, facets. Both when left out. |
query | string または null | 任意 | Full text, as in POST /documents/search. |
reference_numbers | string の配列 | 任意 | Keep the documents whose reference number contains one of these, ignoring case. |
weights | SearchWeightsInput または null | 任意 | How much each field counts towards the score of a match of the query. 0 leaves a field out. |
FacetBucket
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
document_count | integer | 必須 | The matching documents that hold the value. ≥ -2147483648; ≤ 2147483647 |
value | string | 必須 | The value as facet_filters takes it. An empty string counts the documents with no value. |
FacetCounts
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
facet | string | 必須 | |
values | FacetBucket の配列 | 必須 |
FacetValues
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
documents_without_value | integer | 必須 | The matching documents with no value, when the values were not narrowed to a text. ≥ -2147483648; ≤ 2147483647 |
facet | string | 必須 | |
is_approximate | boolean | 必須 | Counted on a sample of a large organisation's documents and scaled up. |
is_truncated | boolean | 必須 | More values than were listed exist: type more of the value to find it. |
values | FacetBucket の配列 | 必須 | The most frequent first; documents with no value are left out (see documents_without_value). |
SearchDateRangeInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
field | string | 必須 | One of document_date, created_at, file_created_at, file_modified_at. |
from | string (date) または null | 任意 | The first day; open when left out. |
to | string (date) または null | 任意 | The last day; open when left out. |
SearchFacetFilterInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
facet | string | 必須 | One of document_type, document_sub_type, from, to, project, folder, location, tag, created_by, file_content_type, file_author, file_last_author, file_producer, file_title. |
values | SearchFacetValueInput の配列 | 必須 | Alternatives: a document is kept when its facet holds any of them. |
SearchFacetValueInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
include_children | boolean | 任意 | With match exact, also select the values under this one in a hierarchy (a folder's subfolders): the facet starts with the value, ignoring case. |
match | string または null | 任意 | exact (the default: the facet equals the value) or contains (the facet contains the text, ignoring case). |
value | string | 必須 | A value as the facet lists it. An empty string selects the documents with no value. |
SearchWeightsInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
ccs | integer または null | 任意 | |
content | integer または null | 任意 | |
description | integer または null | 任意 | |
document_number | integer または null | 任意 | |
folders | integer または null | 任意 | |
from | integer または null | 任意 | |
other_number | integer または null | 任意 | |
reference_number | integer または null | 任意 | |
to | integer または null | 任意 |