このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Searches the documents the caller can read, as the Portal's Search app or by precise filters. query is full text (words are ANDed, OR, "exact phrase", -exclude). Two engines answer, chosen by the members sent. The precise engine reads meaning (a search by meaning; needs the organisation's document embeddings) and filter (a tree of and, or, not and {field, op, value} leaves over the document fields, ops eq, ne, in, gt, gte, lt, lte, contains, starts_with, is_null; lookup-backed fields are named <field>_id). The Search app's engine reads weights, facet_filters (folder, tag, location, document type, from, to, project, file author and so on), document_number_prefixes, reference_numbers, date_ranges (document, entry and file dates), exclude_duplicates and highlight (passages with their pages). One search cannot hold members of both. Each hit carries its score. Relevance pages by the engine's order; sort=document_id orders by document ID.
filter と meaning は、すべての会社で利用できるわけではありません。利用できない会社でこれらを使って呼び出すと、422 の unsupported_for_tenant で拒否されます。ただし、検索アプリのエンジンが読むメンバーも同時に送った場合は、422 の validation_failed で拒否されます。
| |
|---|
| スコープ | documents:search |
| 非同期 | いいえ |
| MCP ツール | search_documents |
| Portal の権限 | search_documents |
| 会社に必要な機能 | search |
| ページング | snapshot |
| 既定の並び順 | -relevance, document_id |
| 並べ替えに使えるフィールド | relevance, document_id |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|
limit | query | integer | 任意 | 既定値: 50; ≥ 1 |
cursor | query | string | 任意 | |
sort | query | string | 任意 | Comma-separated sort fields, - for descending. |
Docwize-Version | header | string (date) | 任意 | |
リクエスト本文
200 の本文
| フィールド | 型 | 必須 | 説明 |
|---|
items | DocumentSearchHit の配列 | 必須 | |
next_cursor | string または null | 必須 | |
warnings | object の配列 | 必須 | |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
AdditionalField
| フィールド | 型 | 必須 | 説明 |
|---|
label | string または null | 必須 | |
value | string または null | 必須 | |
AdditionalFields
CarbonCopy
| フィールド | 型 | 必須 | 説明 |
|---|
cc_id | string | 必須 | |
contact | object または null | 必須 | The contact of the organisation the copy names; null for the organisation on its own. |
organisation | object または null | 必須 | |
DocumentFile
| フィールド | 型 | 必須 | 説明 |
|---|
content_type | string または null | 必須 | |
file_hash | string または null | 必須 | The hash the Portal stored for the file's content; null when none was recorded. |
file_name | string | 必須 | |
has_pdf | boolean | 必須 | Whether a PDF rendition of the file is ready (an Office file converts on demand, so false only means not yet). |
is_indexed | boolean | 必須 | Whether the file's text has been indexed for search. |
page_count | integer または null | 必須 | The pages the file has, once the Portal has counted them; null before. |
size_bytes | string または null | 必須 | |
version_id | string | 必須 | |
DocumentFolder
| フィールド | 型 | 必須 | 説明 |
|---|
folder_id | string | 必須 | |
path | string または null | 必須 | |
DocumentSearchHit
| フィールド | 型 | 必須 | 説明 |
|---|
actual_submission_date | string または null | 必須 | |
additional_fields | AdditionalFields | 必須 | |
attachment_state | string または null | 必須 | none, has_attachments or is_attachment (the document is an attachment of another); null unless include names attachment_state. |
carbon_copies | CarbonCopy の配列 | 必須 | The organisations and contacts the document is copied to; empty unless include names carbon_copies. |
created_at | string (date-time) または null | 必須 | |
created_by | UserRef または null | 必須 | |
description | string または null | 必須 | |
document_date | string または null | 必須 | |
document_id | string | 必須 | |
document_number | string または null | 必須 | |
document_status | object または null | 必須 | The status shown as Status in the Portal (lookup_actionstatus). |
document_sub_type | object または null | 必須 | |
document_type | object または null | 必須 | |
duplicate_of | string または null | 必須 | The number of the document this one duplicates (the Portal's Duplicate Of). |
file | DocumentFile または null | 必須 | The current file (name, type, size), as GET /documents/{document_id} shows it; null when the document has none or include leaves file out. |
folders | DocumentFolder の配列 | 必須 | The folders the document is filed in that the caller can see, as GET /documents/{document_id} lists them; empty unless include names folders. |
from_contact | object または null | 必須 | |
from_organisation | object または null | 必須 | |
highlights | SearchHighlight の配列 | 必須 | Passages that matched the query, with their pages; empty unless the search asked for highlight, and for the precise engine (filter, meaning). |
is_latest_revision | boolean | 必須 | |
is_locked | boolean | 必須 | |
is_privileged | boolean | 必須 | |
locations | SearchHitLocation の配列 | 必須 | The locations the document is filed in; empty unless include names locations. |
main_document_date | string または null | 必須 | |
owner | UserRef または null | 必須 | |
page_end | number または null | 必須 | Last page of the range this document covers in its file. |
page_start | number または null | 必須 | First page of the range this document covers in its file. |
post_review_status | object または null | 必須 | |
project | object または null | 必須 | The stored project number text, with the project's ID when one matches. |
project_organisation | object または null | 必須 | |
reference_number | string または null | 必須 | |
relevance | number または null | 必須 | 1 is relevant (the default), 0 is irrelevant (the Portal's Irrelevant switch). |
responded_with | string または null | 必須 | The reference of the document that responded to this one (the Portal's Responded With). |
response_date | string または null | 必須 | |
response_due_date | string または null | 必須 | |
revision_number | string または null | 必須 | |
score | number | 必須 | How well the document matches the query, higher first. 0 when the search has no query. |
tags | SearchHitTag の配列 | 必須 | The document's tags that are open to the caller; empty unless include names tags. |
to_contact | object または null | 必須 | |
to_organisation | object または null | 必須 | |
| フィールド | 型 | 必須 | 説明 |
|---|
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. |
filter | object または null | 任意 | A tree of and, or, not and {field, op, value} leaves over the document fields (precise engine). |
highlight | SearchHighlightOptionsInput または null | 任意 | Return the passages of each hit that hold the query's words, with their pages (Search app's engine). |
include | string の配列 | 任意 | Columns to add to each hit, as the Search app's results grid shows them: folders, tags, locations, carbon_copies, attachment_state, file. None when left out. |
meaning | string または null | 任意 | A search by meaning (needs the organisation's document embeddings; precise engine). |
query | string または null | 任意 | Full text: words are ANDed; OR, "exact phrase" and -exclude work. The Search app's engine also reads parentheses, NOT, AND, a trailing * and field:term, and matches the fields weights names, not only the content. |
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. |
| フィールド | 型 | 必須 | 説明 |
|---|
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. |
| フィールド | 型 | 必須 | 説明 |
|---|
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. |
| フィールド | 型 | 必須 | 説明 |
|---|
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. |
SearchHighlight
| フィールド | 型 | 必須 | 説明 |
|---|
field | string | 必須 | The field the passage comes from: content, document_number, description, reference_number, from, to, ccs, other_number or folders. |
html | string | 必須 | The passage with the matched words in <b>; everything else is HTML-escaped. |
page | integer または null | 必須 | The 1-based page of the document the passage is on; null when the text has no pages. |
| フィールド | 型 | 必須 | 説明 |
|---|
fragment_size | integer または null | 任意 | Characters per passage, 20 to 2000 (default 150). |
fragments | integer または null | 任意 | Passages per field and hit, 1 to 20 (default 3). |
SearchHitLocation
| フィールド | 型 | 必須 | 説明 |
|---|
location_id | string | 必須 | |
path | string または null | 必須 | |
SearchHitTag
| フィールド | 型 | 必須 | 説明 |
|---|
name | string | 必須 | |
tag_id | string | 必須 | |
| フィールド | 型 | 必須 | 説明 |
|---|
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 | 任意 | |
UserRef
| フィールド | 型 | 必須 | 説明 |
|---|
display_name | string | 必須 | |
kind | string: user, system, integration または string | 必須 | |
user_id | string または null | 必須 | |