SearchDatasetDocuments

更新时间:
复制 MD 格式

Searches documents in a data source.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

aimiaobi:SearchDatasetDocuments

list

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The ID of the Model Studio workspace. For more information, see Get workspaceId.

xx

Query

string

Yes

The search query.

搜索内容

DatasetId

integer

No

The ID of the dataset. You must specify either DatasetId or DatasetName.

1

DatasetName

string

No

The name of the dataset.

数据集名称

IncludeContent

boolean

No

Specifies whether to include the document content in the search results. The default value is false.

false

Extend1

string

No

A business parameter.

业务参数

PageSize

string

No

The number of documents to return per page.

10

CategoryUuids

array

No

A list of category UUIDs for filtering.

string

No

Tags

array

No

A list of tags for filtering.

string

No

Extend2

string

No

A reserved business parameter.

Extend3

string

No

A reserved business parameter.

CreateTimeStart

integer

No

The start time for document creation, specified as a Unix timestamp.

CreateTimeEnd

integer

No

The end time for document creation, specified as a Unix timestamp.

StartTime

integer

No

The start of the time range for filtering, specified as a Unix timestamp.

EndTime

integer

No

The end of the time range for filtering, specified as a Unix timestamp.

DocUuids

array

No

A list of document UUIDs for filtering.

string

No

DocIds

array

No

A list of document IDs for filtering.

string

No

SearchMode

string

No

The search mode.

DocTypes

array

No

A list of document types for filtering.

string

No

Response elements

Element

Type

Description

Example

object

The response.

Data

object

The data.

Documents

array<object>

The document list.

array<object>

A document in the document list.

DocUuid

string

The unique system ID of the document.

xxx

Url

string

The URL of the document.

xx

Content

string

The content of the document.

xx

Summary

string

The summary of the document.

文章摘要

Title

string

The title of the document.

xx

PubTime

string

The publication time, in yyyy-MM-dd HH:mm:ss format.

2024-12-09 17:09:40

SourceFrom

string

The source of the document.

来源

DocId

string

The user-defined unique ID for the document.

xx

DocType

string

The document type.

text

CategoryUuid

string

The unique identifier for the category.

xx

Extend1

string

Custom extension field 1.

xx

Extend2

string

Custom extension field 2.

xx

Extend3

string

Custom extension field 3.

xx

Tags

array

A list of tags.

string

The name of a tag.

xx

SearchSourceType

string

The dataset type.

xx

SearchSource

string

The unique identifier for the dataset.

xx

SearchSourceName

string

The name of the dataset.

xx

Score

number

The relevance score.

0.5

ChunkInfos

array<object>

A list of relevant chunks from the document. This field is returned only in document mode.

object

An object that contains details about a relevant chunk.

Chunk

string

The content of the chunk.

xx

Score

number

The relevance score of the chunk.

0.77

Chunk

string

The content of the relevant chunk. This field is returned only in chunk mode.

xx

RequestId

string

The request ID.

1813ceee-7fe5-41b4-87e5-982a4d18cca5

Success

boolean

Indicates if the request succeeded (true) or failed (false).

true

Code

string

The status code.

NoData

Message

string

The status message.

success

HttpStatusCode

integer

The HTTP status code.

200

Examples

Success response

JSON format

{
  "Data": {
    "Documents": [
      {
        "DocUuid": "xxx",
        "Url": "xx",
        "Content": "xx",
        "Summary": "文章摘要",
        "Title": "xx",
        "PubTime": "2024-12-09 17:09:40",
        "SourceFrom": "来源",
        "DocId": "xx",
        "DocType": "text",
        "CategoryUuid": "xx",
        "Extend1": "xx",
        "Extend2": "xx",
        "Extend3": "xx",
        "Tags": [
          "xx"
        ],
        "SearchSourceType": "xx",
        "SearchSource": "xx",
        "SearchSourceName": "xx",
        "Score": 0.5,
        "ChunkInfos": [
          {
            "Chunk": "xx",
            "Score": 0.77
          }
        ],
        "Chunk": "xx"
      }
    ]
  },
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Success": true,
  "Code": "NoData",
  "Message": "success",
  "HttpStatusCode": 200
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.