larksearch

package
v3.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StateOnline  = 0 // 已上线
	StateOffline = 1 // 未上线

)
View Source
const (
	ViewFULL  = 0 // 全量数据
	ViewBASIC = 1 // 摘要数据

)
View Source
const (
	StatePatchDataSourceOnline  = 0 // 已上线
	StatePatchDataSourceOffline = 1 // 未上线

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Acl

type Acl struct {
	Access *string `json:"access,omitempty"` // 权限类型,优先级:Deny > Allow。
	Value  *string `json:"value,omitempty"`  // 设置的权限值,例如 userID ,依赖 type 描述。;;**注**:在 type 为 user 且 access 为 allow 时,可填 "everyone" 来表示该数据项对全员可见;
	Type   *string `json:"type,omitempty"`   // 权限值类型
}

type AclBuilder

type AclBuilder struct {
	// contains filtered or unexported fields
}

func NewAclBuilder

func NewAclBuilder() *AclBuilder

func (*AclBuilder) Access

func (builder *AclBuilder) Access(access string) *AclBuilder

权限类型,优先级:Deny > Allow。

示例值:allow

func (*AclBuilder) Build

func (builder *AclBuilder) Build() *Acl

func (*AclBuilder) Type

func (builder *AclBuilder) Type(type_ string) *AclBuilder

权限值类型

示例值:user

func (*AclBuilder) Value

func (builder *AclBuilder) Value(value string) *AclBuilder

设置的权限值,例如 userID ,依赖 type 描述。;;**注**:在 type 为 user 且 access 为 allow 时,可填 "everyone" 来表示该数据项对全员可见;

示例值:d35e3c23

type BatchItemResult

type BatchItemResult struct {
	ItemId    *string `json:"item_id,omitempty"`    // 数据项ID,对应一条索引数据的ID
	IsSuccess *bool   `json:"is_success,omitempty"` // 判断单条数据是否成功
	Err       *string `json:"err,omitempty"`        // 如果单条数据失败,表示单条数据的错误信息;如果单条数据成功被索引,则err是空字符串
}

type BatchItemResultBuilder

type BatchItemResultBuilder struct {
	// contains filtered or unexported fields
}

func NewBatchItemResultBuilder

func NewBatchItemResultBuilder() *BatchItemResultBuilder

func (*BatchItemResultBuilder) Build

func (builder *BatchItemResultBuilder) Build() *BatchItemResult

func (*BatchItemResultBuilder) Err

如果单条数据失败,表示单条数据的错误信息;如果单条数据成功被索引,则err是空字符串

示例值:

func (*BatchItemResultBuilder) IsSuccess

func (builder *BatchItemResultBuilder) IsSuccess(isSuccess bool) *BatchItemResultBuilder

判断单条数据是否成功

示例值:

func (*BatchItemResultBuilder) ItemId

func (builder *BatchItemResultBuilder) ItemId(itemId string) *BatchItemResultBuilder

数据项ID,对应一条索引数据的ID

示例值:

type ConnectDataSource

type ConnectDataSource struct {
	ServiceUrl         *string `json:"service_url,omitempty"`         // 要托管的服务API地址,例如https://open.feishu.cn/xxxx/xxxx
	ProjectName        *string `json:"project_name,omitempty"`        // 项目地址,只能包含小写字母,如bytedance_test
	DisplayName        *string `json:"display_name,omitempty"`        // datasource名称,会展示在飞书搜索分类按钮(searchTab)中,如:公司wiki
	Description        *string `json:"description,omitempty"`         // 描述datasource
	IconUrl            *string `json:"icon_url,omitempty"`            // 图标
	ProjectDescription *string `json:"project_description,omitempty"` // 托管api的描述
	ContactEmail       *string `json:"contact_email,omitempty"`       // 联系人邮箱,开发人员的邮箱,用于托管API的SLA(Service Level Agreement)问题沟通
	TenantName         *string `json:"tenant_name,omitempty"`         // 创建api的组织名称,对企业开发者来说,建议使用企业名称
}

type ConnectDataSourceBuilder

type ConnectDataSourceBuilder struct {
	// contains filtered or unexported fields
}

func NewConnectDataSourceBuilder

func NewConnectDataSourceBuilder() *ConnectDataSourceBuilder

func (*ConnectDataSourceBuilder) Build

func (builder *ConnectDataSourceBuilder) Build() *ConnectDataSource

func (*ConnectDataSourceBuilder) ContactEmail

func (builder *ConnectDataSourceBuilder) ContactEmail(contactEmail string) *ConnectDataSourceBuilder

联系人邮箱,开发人员的邮箱,用于托管API的SLA(Service Level Agreement)问题沟通

示例值:

func (*ConnectDataSourceBuilder) Description

func (builder *ConnectDataSourceBuilder) Description(description string) *ConnectDataSourceBuilder

描述datasource

示例值:

func (*ConnectDataSourceBuilder) DisplayName

func (builder *ConnectDataSourceBuilder) DisplayName(displayName string) *ConnectDataSourceBuilder

datasource名称,会展示在飞书搜索分类按钮(searchTab)中,如:公司wiki

示例值:

func (*ConnectDataSourceBuilder) IconUrl

func (builder *ConnectDataSourceBuilder) IconUrl(iconUrl string) *ConnectDataSourceBuilder

图标

示例值:

func (*ConnectDataSourceBuilder) ProjectDescription

func (builder *ConnectDataSourceBuilder) ProjectDescription(projectDescription string) *ConnectDataSourceBuilder

托管api的描述

示例值:

func (*ConnectDataSourceBuilder) ProjectName

func (builder *ConnectDataSourceBuilder) ProjectName(projectName string) *ConnectDataSourceBuilder

项目地址,只能包含小写字母,如bytedance_test

示例值:

func (*ConnectDataSourceBuilder) ServiceUrl

func (builder *ConnectDataSourceBuilder) ServiceUrl(serviceUrl string) *ConnectDataSourceBuilder

要托管的服务API地址,例如https://open.feishu.cn/xxxx/xxxx

示例值:

func (*ConnectDataSourceBuilder) TenantName

func (builder *ConnectDataSourceBuilder) TenantName(tenantName string) *ConnectDataSourceBuilder

创建api的组织名称,对企业开发者来说,建议使用企业名称

示例值:

type CreateDataSourceItemReq

type CreateDataSourceItemReq struct {
	Item *Item `body:""`
	// contains filtered or unexported fields
}

type CreateDataSourceItemReqBuilder

type CreateDataSourceItemReqBuilder struct {
	// contains filtered or unexported fields
}

func NewCreateDataSourceItemReqBuilder

func NewCreateDataSourceItemReqBuilder() *CreateDataSourceItemReqBuilder

func (*CreateDataSourceItemReqBuilder) Build

func (*CreateDataSourceItemReqBuilder) DataSourceId

func (builder *CreateDataSourceItemReqBuilder) DataSourceId(dataSourceId string) *CreateDataSourceItemReqBuilder

数据源的ID

示例值:service_ticket

func (*CreateDataSourceItemReqBuilder) Item

索引一条数据记录

type CreateDataSourceItemResp

type CreateDataSourceItemResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*CreateDataSourceItemResp) Success

func (resp *CreateDataSourceItemResp) Success() bool

type CreateDataSourceReq

type CreateDataSourceReq struct {
	DataSource *DataSource `body:""`
	// contains filtered or unexported fields
}

type CreateDataSourceReqBuilder

type CreateDataSourceReqBuilder struct {
	// contains filtered or unexported fields
}

func NewCreateDataSourceReqBuilder

func NewCreateDataSourceReqBuilder() *CreateDataSourceReqBuilder

func (*CreateDataSourceReqBuilder) Build

func (*CreateDataSourceReqBuilder) DataSource

func (builder *CreateDataSourceReqBuilder) DataSource(dataSource *DataSource) *CreateDataSourceReqBuilder

创建一个数据源

type CreateDataSourceResp

type CreateDataSourceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateDataSourceRespData `json:"data"` // 业务数据
}

func (*CreateDataSourceResp) Success

func (resp *CreateDataSourceResp) Success() bool

type CreateDataSourceRespData

type CreateDataSourceRespData struct {
	DataSource *DataSource `json:"data_source,omitempty"` // 数据源实例
}

type CreateSchemaReq

type CreateSchemaReq struct {
	Schema *Schema `body:""`
	// contains filtered or unexported fields
}

type CreateSchemaReqBuilder

type CreateSchemaReqBuilder struct {
	// contains filtered or unexported fields
}

func NewCreateSchemaReqBuilder

func NewCreateSchemaReqBuilder() *CreateSchemaReqBuilder

func (*CreateSchemaReqBuilder) Build

func (builder *CreateSchemaReqBuilder) Build() *CreateSchemaReq

func (*CreateSchemaReqBuilder) Schema

func (builder *CreateSchemaReqBuilder) Schema(schema *Schema) *CreateSchemaReqBuilder

创建一个数据源

func (*CreateSchemaReqBuilder) ValidateOnly

func (builder *CreateSchemaReqBuilder) ValidateOnly(validateOnly bool) *CreateSchemaReqBuilder

是否只用来校验合法性

示例值:true

type CreateSchemaResp

type CreateSchemaResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *CreateSchemaRespData `json:"data"` // 业务数据
}

func (*CreateSchemaResp) Success

func (resp *CreateSchemaResp) Success() bool

type CreateSchemaRespData

type CreateSchemaRespData struct {
	Schema *Schema `json:"schema,omitempty"` // 数据范式实例
}

type DataSource

type DataSource struct {
	Id               *string   `json:"id,omitempty"`                // 数据源的唯一标识
	Name             *string   `json:"name,omitempty"`              // data_source的展示名称
	State            *int      `json:"state,omitempty"`             // 数据源状态,0-已上线,1-未上线
	Description      *string   `json:"description,omitempty"`       // 对于数据源的描述
	CreateTime       *string   `json:"create_time,omitempty"`       // 创建时间,使用Unix时间戳,单位为“秒”
	UpdateTime       *string   `json:"update_time,omitempty"`       // 更新时间,使用Unix时间戳,单位为“秒”
	IsExceedQuota    *bool     `json:"is_exceed_quota,omitempty"`   // 是否超限
	IconUrl          *string   `json:"icon_url,omitempty"`          // 数据源在 search tab 上的展示图标路径
	Template         *string   `json:"template,omitempty"`          // 数据源采用的展示模版名称
	SearchableFields []string  `json:"searchable_fields,omitempty"` // 描述哪些字段可以被搜索
	I18nName         *I18nMeta `json:"i18n_name,omitempty"`         // 数据源的国际化展示名称
	I18nDescription  *I18nMeta `json:"i18n_description,omitempty"`  // 数据源的国际化描述
	SchemaId         *string   `json:"schema_id,omitempty"`         // 数据源关联的 schema 标识
}

type DataSourceBuilder

type DataSourceBuilder struct {
	// contains filtered or unexported fields
}

func NewDataSourceBuilder

func NewDataSourceBuilder() *DataSourceBuilder

func (*DataSourceBuilder) Build

func (builder *DataSourceBuilder) Build() *DataSource

func (*DataSourceBuilder) CreateTime

func (builder *DataSourceBuilder) CreateTime(createTime string) *DataSourceBuilder

创建时间,使用Unix时间戳,单位为“秒”

示例值:

func (*DataSourceBuilder) Description

func (builder *DataSourceBuilder) Description(description string) *DataSourceBuilder

对于数据源的描述

示例值:搜索客服工单数据

func (*DataSourceBuilder) I18nDescription

func (builder *DataSourceBuilder) I18nDescription(i18nDescription *I18nMeta) *DataSourceBuilder

数据源的国际化描述

示例值:

func (*DataSourceBuilder) I18nName

func (builder *DataSourceBuilder) I18nName(i18nName *I18nMeta) *DataSourceBuilder

数据源的国际化展示名称

示例值:

func (*DataSourceBuilder) IconUrl

func (builder *DataSourceBuilder) IconUrl(iconUrl string) *DataSourceBuilder

数据源在 search tab 上的展示图标路径

示例值:https://www.xxx.com/open.jpg

func (*DataSourceBuilder) Id

func (builder *DataSourceBuilder) Id(id string) *DataSourceBuilder

数据源的唯一标识

示例值:5577006791947779410

func (*DataSourceBuilder) IsExceedQuota

func (builder *DataSourceBuilder) IsExceedQuota(isExceedQuota bool) *DataSourceBuilder

是否超限

示例值:

func (*DataSourceBuilder) Name

func (builder *DataSourceBuilder) Name(name string) *DataSourceBuilder

data_source的展示名称

示例值:客服工单

func (*DataSourceBuilder) SchemaId

func (builder *DataSourceBuilder) SchemaId(schemaId string) *DataSourceBuilder

数据源关联的 schema 标识

示例值:custom_schema

func (*DataSourceBuilder) SearchableFields

func (builder *DataSourceBuilder) SearchableFields(searchableFields []string) *DataSourceBuilder

描述哪些字段可以被搜索

示例值:["field1", "field2"](不推荐使用,如果有定制搜索需求,请用 schema 接口)

func (*DataSourceBuilder) State

func (builder *DataSourceBuilder) State(state int) *DataSourceBuilder

数据源状态,0-已上线,1-未上线

示例值:0

func (*DataSourceBuilder) Template

func (builder *DataSourceBuilder) Template(template string) *DataSourceBuilder

数据源采用的展示模版名称

示例值:search_common_card

func (*DataSourceBuilder) UpdateTime

func (builder *DataSourceBuilder) UpdateTime(updateTime string) *DataSourceBuilder

更新时间,使用Unix时间戳,单位为“秒”

示例值:

type DeleteDataSourceItemReq

type DeleteDataSourceItemReq struct {
	// contains filtered or unexported fields
}

type DeleteDataSourceItemReqBuilder

type DeleteDataSourceItemReqBuilder struct {
	// contains filtered or unexported fields
}

func NewDeleteDataSourceItemReqBuilder

func NewDeleteDataSourceItemReqBuilder() *DeleteDataSourceItemReqBuilder

func (*DeleteDataSourceItemReqBuilder) Build

func (*DeleteDataSourceItemReqBuilder) DataSourceId

func (builder *DeleteDataSourceItemReqBuilder) DataSourceId(dataSourceId string) *DeleteDataSourceItemReqBuilder

数据源的ID

示例值:service_ticket

func (*DeleteDataSourceItemReqBuilder) ItemId

数据记录的ID

示例值:01010111

type DeleteDataSourceItemResp

type DeleteDataSourceItemResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*DeleteDataSourceItemResp) Success

func (resp *DeleteDataSourceItemResp) Success() bool

type DeleteDataSourceReq

type DeleteDataSourceReq struct {
	// contains filtered or unexported fields
}

type DeleteDataSourceReqBuilder

type DeleteDataSourceReqBuilder struct {
	// contains filtered or unexported fields
}

func NewDeleteDataSourceReqBuilder

func NewDeleteDataSourceReqBuilder() *DeleteDataSourceReqBuilder

func (*DeleteDataSourceReqBuilder) Build

func (*DeleteDataSourceReqBuilder) DataSourceId

func (builder *DeleteDataSourceReqBuilder) DataSourceId(dataSourceId string) *DeleteDataSourceReqBuilder

数据源的唯一标识

示例值:6953903108179099667

type DeleteDataSourceResp

type DeleteDataSourceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*DeleteDataSourceResp) Success

func (resp *DeleteDataSourceResp) Success() bool

type DeleteSchemaReq

type DeleteSchemaReq struct {
	// contains filtered or unexported fields
}

type DeleteSchemaReqBuilder

type DeleteSchemaReqBuilder struct {
	// contains filtered or unexported fields
}

func NewDeleteSchemaReqBuilder

func NewDeleteSchemaReqBuilder() *DeleteSchemaReqBuilder

func (*DeleteSchemaReqBuilder) Build

func (builder *DeleteSchemaReqBuilder) Build() *DeleteSchemaReq

func (*DeleteSchemaReqBuilder) SchemaId

func (builder *DeleteSchemaReqBuilder) SchemaId(schemaId string) *DeleteSchemaReqBuilder

用户自定义数据范式的唯一标识

示例值:custom_schema_id

type DeleteSchemaResp

type DeleteSchemaResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
}

func (*DeleteSchemaResp) Success

func (resp *DeleteSchemaResp) Success() bool

type GetDataSourceItemReq

type GetDataSourceItemReq struct {
	// contains filtered or unexported fields
}

type GetDataSourceItemReqBuilder

type GetDataSourceItemReqBuilder struct {
	// contains filtered or unexported fields
}

func NewGetDataSourceItemReqBuilder

func NewGetDataSourceItemReqBuilder() *GetDataSourceItemReqBuilder

func (*GetDataSourceItemReqBuilder) Build

func (*GetDataSourceItemReqBuilder) DataSourceId

func (builder *GetDataSourceItemReqBuilder) DataSourceId(dataSourceId string) *GetDataSourceItemReqBuilder

数据源的id

示例值:service_ticket

func (*GetDataSourceItemReqBuilder) ItemId

数据记录的唯一标识

示例值:01010111

type GetDataSourceItemResp

type GetDataSourceItemResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetDataSourceItemRespData `json:"data"` // 业务数据
}

func (*GetDataSourceItemResp) Success

func (resp *GetDataSourceItemResp) Success() bool

type GetDataSourceItemRespData

type GetDataSourceItemRespData struct {
	Item *Item `json:"item,omitempty"` // 数据项实例
}

type GetDataSourceReq

type GetDataSourceReq struct {
	// contains filtered or unexported fields
}

type GetDataSourceReqBuilder

type GetDataSourceReqBuilder struct {
	// contains filtered or unexported fields
}

func NewGetDataSourceReqBuilder

func NewGetDataSourceReqBuilder() *GetDataSourceReqBuilder

func (*GetDataSourceReqBuilder) Build

func (builder *GetDataSourceReqBuilder) Build() *GetDataSourceReq

func (*GetDataSourceReqBuilder) DataSourceId

func (builder *GetDataSourceReqBuilder) DataSourceId(dataSourceId string) *GetDataSourceReqBuilder

数据源的唯一标识

示例值:service_ticket

type GetDataSourceResp

type GetDataSourceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetDataSourceRespData `json:"data"` // 业务数据
}

func (*GetDataSourceResp) Success

func (resp *GetDataSourceResp) Success() bool

type GetDataSourceRespData

type GetDataSourceRespData struct {
	DataSource *DataSource `json:"data_source,omitempty"` // 数据源实例
}

type GetSchemaReq

type GetSchemaReq struct {
	// contains filtered or unexported fields
}

type GetSchemaReqBuilder

type GetSchemaReqBuilder struct {
	// contains filtered or unexported fields
}

func NewGetSchemaReqBuilder

func NewGetSchemaReqBuilder() *GetSchemaReqBuilder

func (*GetSchemaReqBuilder) Build

func (builder *GetSchemaReqBuilder) Build() *GetSchemaReq

func (*GetSchemaReqBuilder) SchemaId

func (builder *GetSchemaReqBuilder) SchemaId(schemaId string) *GetSchemaReqBuilder

用户自定义数据范式的唯一标识

示例值:custom_schema_id

type GetSchemaResp

type GetSchemaResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *GetSchemaRespData `json:"data"` // 业务数据
}

func (*GetSchemaResp) Success

func (resp *GetSchemaResp) Success() bool

type GetSchemaRespData

type GetSchemaRespData struct {
	Schema *Schema `json:"schema,omitempty"` // 数据范式
}

type I18nMeta

type I18nMeta struct {
	ZhCn *string `json:"zh_cn,omitempty"` // 国际化字段:中文
	EnUs *string `json:"en_us,omitempty"` // 国际化字段:英文
	JaJp *string `json:"ja_jp,omitempty"` // 国际化字段:日文
}

type I18nMetaBuilder

type I18nMetaBuilder struct {
	// contains filtered or unexported fields
}

func NewI18nMetaBuilder

func NewI18nMetaBuilder() *I18nMetaBuilder

func (*I18nMetaBuilder) Build

func (builder *I18nMetaBuilder) Build() *I18nMeta

func (*I18nMetaBuilder) EnUs

func (builder *I18nMetaBuilder) EnUs(enUs string) *I18nMetaBuilder

国际化字段:英文

示例值:TODO

func (*I18nMetaBuilder) JaJp

func (builder *I18nMetaBuilder) JaJp(jaJp string) *I18nMetaBuilder

国际化字段:日文

示例值:タスク

func (*I18nMetaBuilder) ZhCn

func (builder *I18nMetaBuilder) ZhCn(zhCn string) *I18nMetaBuilder

国际化字段:中文

示例值:任务

type Item

type Item struct {
	Id             *string       `json:"id,omitempty"`              // item 在 datasource 中的唯一标识
	Acl            []*Acl        `json:"acl,omitempty"`             // item 的访问权限控制。 acl 字段为空数组,则默认数据不可见。如果数据是全员可见,需要设置 access="allow"; type="user"; value="everyone"
	Metadata       *ItemMetadata `json:"metadata,omitempty"`        // item 的元信息
	StructuredData *string       `json:"structured_data,omitempty"` // 结构化数据(以 json 字符串传递),这些字段是搜索结果的展示字段(title字段无须在此另外指定);
	Content        *ItemContent  `json:"content,omitempty"`         // 非结构化数据,如文档文本,飞书搜索会用来做召回
}

type ItemBuilder

type ItemBuilder struct {
	// contains filtered or unexported fields
}

func NewItemBuilder

func NewItemBuilder() *ItemBuilder

func (*ItemBuilder) Acl

func (builder *ItemBuilder) Acl(acl []*Acl) *ItemBuilder

item 的访问权限控制。 acl 字段为空数组,则默认数据不可见。如果数据是全员可见,需要设置 access="allow"; type="user"; value="everyone"

示例值:

func (*ItemBuilder) Build

func (builder *ItemBuilder) Build() *Item

func (*ItemBuilder) Content

func (builder *ItemBuilder) Content(content *ItemContent) *ItemBuilder

非结构化数据,如文档文本,飞书搜索会用来做召回

示例值:

func (*ItemBuilder) Id

func (builder *ItemBuilder) Id(id string) *ItemBuilder

item 在 datasource 中的唯一标识

示例值:01010111

func (*ItemBuilder) Metadata

func (builder *ItemBuilder) Metadata(metadata *ItemMetadata) *ItemBuilder

item 的元信息

示例值:

func (*ItemBuilder) StructuredData

func (builder *ItemBuilder) StructuredData(structuredData string) *ItemBuilder

结构化数据(以 json 字符串传递),这些字段是搜索结果的展示字段(title字段无须在此另外指定);

示例值:{\"key\":\"value\"}

type ItemContent

type ItemContent struct {
	Format      *string `json:"format,omitempty"`       // 内容的格式
	ContentData *string `json:"content_data,omitempty"` // 全文数据
}

type ItemContentBuilder

type ItemContentBuilder struct {
	// contains filtered or unexported fields
}

func NewItemContentBuilder

func NewItemContentBuilder() *ItemContentBuilder

func (*ItemContentBuilder) Build

func (builder *ItemContentBuilder) Build() *ItemContent

func (*ItemContentBuilder) ContentData

func (builder *ItemContentBuilder) ContentData(contentData string) *ItemContentBuilder

全文数据

示例值:这是一个很长的文本

func (*ItemContentBuilder) Format

func (builder *ItemContentBuilder) Format(format string) *ItemContentBuilder

内容的格式

示例值:html

type ItemMetadata

type ItemMetadata struct {
	Title           *string `json:"title,omitempty"`             // 该条数据记录对应的标题
	SourceUrl       *string `json:"source_url,omitempty"`        // 该条数据记录对应的跳转url
	CreateTime      *int    `json:"create_time,omitempty"`       // 数据项的创建时间。Unix 时间,单位为秒
	UpdateTime      *int    `json:"update_time,omitempty"`       // 数据项的更新时间。Unix 时间,单位为秒
	SourceUrlMobile *string `json:"source_url_mobile,omitempty"` // 移动端搜索命中的跳转地址。如果您PC端和移动端有不同的跳转地址,可以在这里写入移动端专用的url,我们会在搜索时为您选择合适的地址
}

type ItemMetadataBuilder

type ItemMetadataBuilder struct {
	// contains filtered or unexported fields
}

func NewItemMetadataBuilder

func NewItemMetadataBuilder() *ItemMetadataBuilder

func (*ItemMetadataBuilder) Build

func (builder *ItemMetadataBuilder) Build() *ItemMetadata

func (*ItemMetadataBuilder) CreateTime

func (builder *ItemMetadataBuilder) CreateTime(createTime int) *ItemMetadataBuilder

数据项的创建时间。Unix 时间,单位为秒

示例值:1618831236

func (*ItemMetadataBuilder) SourceUrl

func (builder *ItemMetadataBuilder) SourceUrl(sourceUrl string) *ItemMetadataBuilder

该条数据记录对应的跳转url

示例值:http://www.abc.com.cn

func (*ItemMetadataBuilder) SourceUrlMobile

func (builder *ItemMetadataBuilder) SourceUrlMobile(sourceUrlMobile string) *ItemMetadataBuilder

移动端搜索命中的跳转地址。如果您PC端和移动端有不同的跳转地址,可以在这里写入移动端专用的url,我们会在搜索时为您选择合适的地址

示例值:https://www.feishu.cn

func (*ItemMetadataBuilder) Title

func (builder *ItemMetadataBuilder) Title(title string) *ItemMetadataBuilder

该条数据记录对应的标题

示例值:工单:无法创建文章

func (*ItemMetadataBuilder) UpdateTime

func (builder *ItemMetadataBuilder) UpdateTime(updateTime int) *ItemMetadataBuilder

数据项的更新时间。Unix 时间,单位为秒

示例值:1618831236

type ItemRecord

type ItemRecord struct {
	ItemId       *string `json:"item_id,omitempty"`        // 冗余当前item的ID
	DataSourceId *string `json:"data_source_id,omitempty"` // 数据源id
	Version      *string `json:"version,omitempty"`        // 当前数据的最新版本号,其值等于上一次item/create接口传入的时间戳
	CreatedAt    *string `json:"created_at,omitempty"`     // 第一次投递时间
	UpdatedAt    *string `json:"updated_at,omitempty"`     // 上一次更新落库时间
}

type ItemRecordBuilder

type ItemRecordBuilder struct {
	// contains filtered or unexported fields
}

func NewItemRecordBuilder

func NewItemRecordBuilder() *ItemRecordBuilder

func (*ItemRecordBuilder) Build

func (builder *ItemRecordBuilder) Build() *ItemRecord

func (*ItemRecordBuilder) CreatedAt

func (builder *ItemRecordBuilder) CreatedAt(createdAt string) *ItemRecordBuilder

第一次投递时间

示例值:

func (*ItemRecordBuilder) DataSourceId

func (builder *ItemRecordBuilder) DataSourceId(dataSourceId string) *ItemRecordBuilder

数据源id

示例值:

func (*ItemRecordBuilder) ItemId

func (builder *ItemRecordBuilder) ItemId(itemId string) *ItemRecordBuilder

冗余当前item的ID

示例值:

func (*ItemRecordBuilder) UpdatedAt

func (builder *ItemRecordBuilder) UpdatedAt(updatedAt string) *ItemRecordBuilder

上一次更新落库时间

示例值:

func (*ItemRecordBuilder) Version

func (builder *ItemRecordBuilder) Version(version string) *ItemRecordBuilder

当前数据的最新版本号,其值等于上一次item/create接口传入的时间戳

示例值:

type ListDataSourceIterator

type ListDataSourceIterator struct {
	// contains filtered or unexported fields
}

func (*ListDataSourceIterator) Next

func (iterator *ListDataSourceIterator) Next() (bool, *DataSource, error)

func (*ListDataSourceIterator) NextPageToken

func (iterator *ListDataSourceIterator) NextPageToken() *string

type ListDataSourceReq

type ListDataSourceReq struct {
	Limit int // 最多返回多少记录,只有在使用迭代器访问时,才有效
	// contains filtered or unexported fields
}

type ListDataSourceReqBuilder

type ListDataSourceReqBuilder struct {
	// contains filtered or unexported fields
}

func NewListDataSourceReqBuilder

func NewListDataSourceReqBuilder() *ListDataSourceReqBuilder

func (*ListDataSourceReqBuilder) Build

func (builder *ListDataSourceReqBuilder) Build() *ListDataSourceReq

func (*ListDataSourceReqBuilder) Limit

func (builder *ListDataSourceReqBuilder) Limit(limit int) *ListDataSourceReqBuilder

最大返回多少记录,当使用迭代器访问时才有效

func (*ListDataSourceReqBuilder) PageSize

func (builder *ListDataSourceReqBuilder) PageSize(pageSize int) *ListDataSourceReqBuilder

示例值:10

func (*ListDataSourceReqBuilder) PageToken

func (builder *ListDataSourceReqBuilder) PageToken(pageToken string) *ListDataSourceReqBuilder

示例值:PxZFma9OIRhdBlT/dOYNiu2Ro8F2WAhcby7OhOijfljZ

func (*ListDataSourceReqBuilder) View

回包数据格式,0-全量数据;1-摘要数据。;;**注**:摘要数据仅包含"id","name","state"。

示例值:0

type ListDataSourceResp

type ListDataSourceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *ListDataSourceRespData `json:"data"` // 业务数据
}

func (*ListDataSourceResp) Success

func (resp *ListDataSourceResp) Success() bool

type ListDataSourceRespData

type ListDataSourceRespData struct {
	HasMore   *bool         `json:"has_more,omitempty"`   // 是否有更多数据
	PageToken *string       `json:"page_token,omitempty"` // 取数据的凭证
	Items     []*DataSource `json:"items,omitempty"`      // 数据源中的数据记录
}

type PatchDataSourcePathReqBodyBuilder

type PatchDataSourcePathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewPatchDataSourcePathReqBodyBuilder

func NewPatchDataSourcePathReqBodyBuilder() *PatchDataSourcePathReqBodyBuilder

func (*PatchDataSourcePathReqBodyBuilder) Build

func (*PatchDataSourcePathReqBodyBuilder) Description

对于数据源的描述

示例值:搜索客服工单

func (*PatchDataSourcePathReqBodyBuilder) I18nDescription

func (builder *PatchDataSourcePathReqBodyBuilder) I18nDescription(i18nDescription *I18nMeta) *PatchDataSourcePathReqBodyBuilder

数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"}

示例值:

func (*PatchDataSourcePathReqBodyBuilder) I18nName

数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"}

示例值:

func (*PatchDataSourcePathReqBodyBuilder) IconUrl

数据源在 search tab 上的展示图标路径

示例值:https://www.xxx.com/open.jpg

func (*PatchDataSourcePathReqBodyBuilder) Name

数据源的展示名称

示例值:客服工单

func (*PatchDataSourcePathReqBodyBuilder) State

数据源状态,0-已上线,1-未上线

示例值:0

type PatchDataSourceReq

type PatchDataSourceReq struct {
	Body *PatchDataSourceReqBody `body:""`
	// contains filtered or unexported fields
}

type PatchDataSourceReqBody

type PatchDataSourceReqBody struct {
	Name            *string   `json:"name,omitempty"`             // 数据源的展示名称
	State           *int      `json:"state,omitempty"`            // 数据源状态,0-已上线,1-未上线
	Description     *string   `json:"description,omitempty"`      // 对于数据源的描述
	IconUrl         *string   `json:"icon_url,omitempty"`         // 数据源在 search tab 上的展示图标路径
	I18nName        *I18nMeta `json:"i18n_name,omitempty"`        // 数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"}
	I18nDescription *I18nMeta `json:"i18n_description,omitempty"` // 数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"}
}

type PatchDataSourceReqBodyBuilder

type PatchDataSourceReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewPatchDataSourceReqBodyBuilder

func NewPatchDataSourceReqBodyBuilder() *PatchDataSourceReqBodyBuilder

func (*PatchDataSourceReqBodyBuilder) Build

func (*PatchDataSourceReqBodyBuilder) Description

func (builder *PatchDataSourceReqBodyBuilder) Description(description string) *PatchDataSourceReqBodyBuilder

对于数据源的描述

示例值:搜索客服工单

func (*PatchDataSourceReqBodyBuilder) I18nDescription

func (builder *PatchDataSourceReqBodyBuilder) I18nDescription(i18nDescription *I18nMeta) *PatchDataSourceReqBodyBuilder

数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"}

示例值:

func (*PatchDataSourceReqBodyBuilder) I18nName

数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"}

示例值:

func (*PatchDataSourceReqBodyBuilder) IconUrl

数据源在 search tab 上的展示图标路径

示例值:https://www.xxx.com/open.jpg

func (*PatchDataSourceReqBodyBuilder) Name

数据源的展示名称

示例值:客服工单

func (*PatchDataSourceReqBodyBuilder) State

数据源状态,0-已上线,1-未上线

示例值:0

type PatchDataSourceReqBuilder

type PatchDataSourceReqBuilder struct {
	// contains filtered or unexported fields
}

func NewPatchDataSourceReqBuilder

func NewPatchDataSourceReqBuilder() *PatchDataSourceReqBuilder

func (*PatchDataSourceReqBuilder) Body

更新一个已经存在的数据源

func (*PatchDataSourceReqBuilder) Build

func (*PatchDataSourceReqBuilder) DataSourceId

func (builder *PatchDataSourceReqBuilder) DataSourceId(dataSourceId string) *PatchDataSourceReqBuilder

数据源的唯一标识

示例值:service_ticket

type PatchDataSourceResp

type PatchDataSourceResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchDataSourceRespData `json:"data"` // 业务数据
}

func (*PatchDataSourceResp) Success

func (resp *PatchDataSourceResp) Success() bool

type PatchDataSourceRespData

type PatchDataSourceRespData struct {
	DataSource *DataSource `json:"data_source,omitempty"` // 数据源
}

type PatchSchemaPathReqBodyBuilder

type PatchSchemaPathReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewPatchSchemaPathReqBodyBuilder

func NewPatchSchemaPathReqBodyBuilder() *PatchSchemaPathReqBodyBuilder

func (*PatchSchemaPathReqBodyBuilder) Build

func (*PatchSchemaPathReqBodyBuilder) Display

数据展示相关配置

示例值:

type PatchSchemaReq

type PatchSchemaReq struct {
	Body *PatchSchemaReqBody `body:""`
	// contains filtered or unexported fields
}

type PatchSchemaReqBody

type PatchSchemaReqBody struct {
	Display *SchemaDisplay `json:"display,omitempty"` // 数据展示相关配置
}

type PatchSchemaReqBodyBuilder

type PatchSchemaReqBodyBuilder struct {
	// contains filtered or unexported fields
}

func NewPatchSchemaReqBodyBuilder

func NewPatchSchemaReqBodyBuilder() *PatchSchemaReqBodyBuilder

func (*PatchSchemaReqBodyBuilder) Build

func (*PatchSchemaReqBodyBuilder) Display

数据展示相关配置

示例值:

type PatchSchemaReqBuilder

type PatchSchemaReqBuilder struct {
	// contains filtered or unexported fields
}

func NewPatchSchemaReqBuilder

func NewPatchSchemaReqBuilder() *PatchSchemaReqBuilder

func (*PatchSchemaReqBuilder) Body

修改数据范式

func (*PatchSchemaReqBuilder) Build

func (builder *PatchSchemaReqBuilder) Build() *PatchSchemaReq

func (*PatchSchemaReqBuilder) SchemaId

func (builder *PatchSchemaReqBuilder) SchemaId(schemaId string) *PatchSchemaReqBuilder

用户自定义数据范式的唯一标识

示例值:custom_schema_id

type PatchSchemaResp

type PatchSchemaResp struct {
	*larkcore.ApiResp `json:"-"`
	larkcore.CodeError
	Data *PatchSchemaRespData `json:"data"` // 业务数据
}

func (*PatchSchemaResp) Success

func (resp *PatchSchemaResp) Success() bool

type PatchSchemaRespData

type PatchSchemaRespData struct {
	Schema *Schema `json:"schema,omitempty"` // 数据范式实例
}

type Schema

type Schema struct {
	Properties []*SchemaProperty `json:"properties,omitempty"` // 数据范式的属性定义
	Display    *SchemaDisplay    `json:"display,omitempty"`    // 数据展示相关配置
	SchemaId   *string           `json:"schema_id,omitempty"`  // 用户自定义数据范式的唯一标识
}

type SchemaBuilder

type SchemaBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaBuilder

func NewSchemaBuilder() *SchemaBuilder

func (*SchemaBuilder) Build

func (builder *SchemaBuilder) Build() *Schema

func (*SchemaBuilder) Display

func (builder *SchemaBuilder) Display(display *SchemaDisplay) *SchemaBuilder

数据展示相关配置

示例值:

func (*SchemaBuilder) Properties

func (builder *SchemaBuilder) Properties(properties []*SchemaProperty) *SchemaBuilder

数据范式的属性定义

示例值:

func (*SchemaBuilder) SchemaId

func (builder *SchemaBuilder) SchemaId(schemaId string) *SchemaBuilder

用户自定义数据范式的唯一标识

示例值:jira_schema

type SchemaDisplay

type SchemaDisplay struct {
	CardKey       *string                      `json:"card_key,omitempty"`       // 搜索数据的展示卡片
	FieldsMapping []*SchemaDisplayFieldMapping `json:"fields_mapping,omitempty"` // 数据字段名称和展示字段名称的映射关系。如果没有设置,则只会展示 与展示字段名称同名的 数据字段
}

type SchemaDisplayBuilder

type SchemaDisplayBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaDisplayBuilder

func NewSchemaDisplayBuilder() *SchemaDisplayBuilder

func (*SchemaDisplayBuilder) Build

func (builder *SchemaDisplayBuilder) Build() *SchemaDisplay

func (*SchemaDisplayBuilder) CardKey

func (builder *SchemaDisplayBuilder) CardKey(cardKey string) *SchemaDisplayBuilder

搜索数据的展示卡片

示例值:search_common_card

func (*SchemaDisplayBuilder) FieldsMapping

func (builder *SchemaDisplayBuilder) FieldsMapping(fieldsMapping []*SchemaDisplayFieldMapping) *SchemaDisplayBuilder

数据字段名称和展示字段名称的映射关系。如果没有设置,则只会展示 与展示字段名称同名的 数据字段

示例值:

type SchemaDisplayFieldMapping

type SchemaDisplayFieldMapping struct {
	DisplayField *string `json:"display_field,omitempty"` // 展示字段名称,与 card_key 有关,每个模版能展示的字段不同。该字段不能重复
	DataField    *string `json:"data_field,omitempty"`    // 数据字段的名称。需要确保该字段对应在 schema 属性定义中的 is_returnable 为 true,否则无法展示。需要使用 ${xxx} 的规则来描述
}

type SchemaDisplayFieldMappingBuilder

type SchemaDisplayFieldMappingBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaDisplayFieldMappingBuilder

func NewSchemaDisplayFieldMappingBuilder() *SchemaDisplayFieldMappingBuilder

func (*SchemaDisplayFieldMappingBuilder) Build

func (*SchemaDisplayFieldMappingBuilder) DataField

数据字段的名称。需要确保该字段对应在 schema 属性定义中的 is_returnable 为 true,否则无法展示。需要使用 ${xxx} 的规则来描述

示例值:${description}

func (*SchemaDisplayFieldMappingBuilder) DisplayField

func (builder *SchemaDisplayFieldMappingBuilder) DisplayField(displayField string) *SchemaDisplayFieldMappingBuilder

展示字段名称,与 card_key 有关,每个模版能展示的字段不同。该字段不能重复

示例值:summary

type SchemaDisplayOption

type SchemaDisplayOption struct {
	DisplayLabel *string `json:"display_label,omitempty"` // 对外展示的标签名
	DisplayType  *string `json:"display_type,omitempty"`  // 对外展示类型
}

type SchemaDisplayOptionBuilder

type SchemaDisplayOptionBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaDisplayOptionBuilder

func NewSchemaDisplayOptionBuilder() *SchemaDisplayOptionBuilder

func (*SchemaDisplayOptionBuilder) Build

func (*SchemaDisplayOptionBuilder) DisplayLabel

func (builder *SchemaDisplayOptionBuilder) DisplayLabel(displayLabel string) *SchemaDisplayOptionBuilder

对外展示的标签名

示例值:

func (*SchemaDisplayOptionBuilder) DisplayType

func (builder *SchemaDisplayOptionBuilder) DisplayType(displayType string) *SchemaDisplayOptionBuilder

对外展示类型

示例值:

type SchemaProperty

type SchemaProperty struct {
	Name            *string                `json:"name,omitempty"`             // 属性名
	Type            *string                `json:"type,omitempty"`             // 属性类型
	IsSearchable    *bool                  `json:"is_searchable,omitempty"`    // 该属性是否可用作搜索,默认为 false
	IsSortable      *bool                  `json:"is_sortable,omitempty"`      // 该属性是否可用作搜索结果排序,默认为 false。如果为 true,需要再配置 sortOptions
	IsReturnable    *bool                  `json:"is_returnable,omitempty"`    // 该属性是否可用作返回字段,为 false 时,该字段不会被召回和展示。默认为 false
	SortOptions     *SchemaSortOptions     `json:"sort_options,omitempty"`     // 属性排序的可选配置,当 is_sortable 为 true 时,该字段为必填字段
	TypeDefinitions *SchemaTypeDefinitions `json:"type_definitions,omitempty"` // 相关类型数据的定义和约束
	SearchOptions   *SchemaSearchOptions   `json:"search_options,omitempty"`   // 属性搜索的可选配置,当 is_searchable 为 true 时,该字段为必填参数
}

type SchemaPropertyBuilder

type SchemaPropertyBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaPropertyBuilder

func NewSchemaPropertyBuilder() *SchemaPropertyBuilder

func (*SchemaPropertyBuilder) Build

func (builder *SchemaPropertyBuilder) Build() *SchemaProperty

func (*SchemaPropertyBuilder) IsReturnable

func (builder *SchemaPropertyBuilder) IsReturnable(isReturnable bool) *SchemaPropertyBuilder

该属性是否可用作返回字段,为 false 时,该字段不会被召回和展示。默认为 false

示例值:true

func (*SchemaPropertyBuilder) IsSearchable

func (builder *SchemaPropertyBuilder) IsSearchable(isSearchable bool) *SchemaPropertyBuilder

该属性是否可用作搜索,默认为 false

示例值:true

func (*SchemaPropertyBuilder) IsSortable

func (builder *SchemaPropertyBuilder) IsSortable(isSortable bool) *SchemaPropertyBuilder

该属性是否可用作搜索结果排序,默认为 false。如果为 true,需要再配置 sortOptions

示例值:false

func (*SchemaPropertyBuilder) Name

func (builder *SchemaPropertyBuilder) Name(name string) *SchemaPropertyBuilder

属性名

示例值:summary

func (*SchemaPropertyBuilder) SearchOptions

func (builder *SchemaPropertyBuilder) SearchOptions(searchOptions *SchemaSearchOptions) *SchemaPropertyBuilder

属性搜索的可选配置,当 is_searchable 为 true 时,该字段为必填参数

示例值:

func (*SchemaPropertyBuilder) SortOptions

func (builder *SchemaPropertyBuilder) SortOptions(sortOptions *SchemaSortOptions) *SchemaPropertyBuilder

属性排序的可选配置,当 is_sortable 为 true 时,该字段为必填字段

示例值:

func (*SchemaPropertyBuilder) Type

func (builder *SchemaPropertyBuilder) Type(type_ string) *SchemaPropertyBuilder

属性类型

示例值:text

func (*SchemaPropertyBuilder) TypeDefinitions

func (builder *SchemaPropertyBuilder) TypeDefinitions(typeDefinitions *SchemaTypeDefinitions) *SchemaPropertyBuilder

相关类型数据的定义和约束

示例值:

type SchemaPropertyDefinition

type SchemaPropertyDefinition struct {
	Name                 *string              `json:"name,omitempty"`                   // 属性名称
	IsReturnable         *bool                `json:"is_returnable,omitempty"`          // 搜索中是否可作为搜索结果返回
	IsRepeatable         *bool                `json:"is_repeatable,omitempty"`          // 是否允许重复
	IsSortable           *bool                `json:"is_sortable,omitempty"`            // 是否可用作排序
	IsFacetable          *bool                `json:"is_facetable,omitempty"`           // 是否可用来生成 facet,仅支持 Boolean,Enum,String 类型属性。
	IsWildcardSearchable *bool                `json:"is_wildcard_searchable,omitempty"` // 是否可以对该属性使用通配符搜索,只支持 String 类型属性。
	Type                 *string              `json:"type,omitempty"`                   // 属性数据类型
	DisplayOptions       *SchemaDisplayOption `json:"display_options,omitempty"`        // 属性对外展示可选项
}

type SchemaPropertyDefinitionBuilder

type SchemaPropertyDefinitionBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaPropertyDefinitionBuilder

func NewSchemaPropertyDefinitionBuilder() *SchemaPropertyDefinitionBuilder

func (*SchemaPropertyDefinitionBuilder) Build

func (*SchemaPropertyDefinitionBuilder) DisplayOptions

属性对外展示可选项

示例值:

func (*SchemaPropertyDefinitionBuilder) IsFacetable

func (builder *SchemaPropertyDefinitionBuilder) IsFacetable(isFacetable bool) *SchemaPropertyDefinitionBuilder

是否可用来生成 facet,仅支持 Boolean,Enum,String 类型属性。

示例值:false

func (*SchemaPropertyDefinitionBuilder) IsRepeatable

func (builder *SchemaPropertyDefinitionBuilder) IsRepeatable(isRepeatable bool) *SchemaPropertyDefinitionBuilder

是否允许重复

示例值:false

func (*SchemaPropertyDefinitionBuilder) IsReturnable

func (builder *SchemaPropertyDefinitionBuilder) IsReturnable(isReturnable bool) *SchemaPropertyDefinitionBuilder

搜索中是否可作为搜索结果返回

示例值:false

func (*SchemaPropertyDefinitionBuilder) IsSortable

func (builder *SchemaPropertyDefinitionBuilder) IsSortable(isSortable bool) *SchemaPropertyDefinitionBuilder

是否可用作排序

示例值:false

func (*SchemaPropertyDefinitionBuilder) IsWildcardSearchable

func (builder *SchemaPropertyDefinitionBuilder) IsWildcardSearchable(isWildcardSearchable bool) *SchemaPropertyDefinitionBuilder

是否可以对该属性使用通配符搜索,只支持 String 类型属性。

示例值:

func (*SchemaPropertyDefinitionBuilder) Name

属性名称

示例值:

func (*SchemaPropertyDefinitionBuilder) Type

属性数据类型

示例值:INTEGER

type SchemaSearchOptions

type SchemaSearchOptions struct {
	EnableSemanticMatch     *bool `json:"enable_semantic_match,omitempty"`      // 是否支持语义切词召回。默认不支持(推荐使用在长文本的场景)
	EnableExactMatch        *bool `json:"enable_exact_match,omitempty"`         // 是否支持精确匹配。默认不支持(推荐使用在短文本、需要精确查找的场景)
	EnablePrefixMatch       *bool `json:"enable_prefix_match,omitempty"`        // 是否支持前缀匹配(短文本的默认的分词/召回策略。前缀长度为 1-12)
	EnableNumberSuffixMatch *bool `json:"enable_number_suffix_match,omitempty"` // 是否支持数据后缀匹配。默认不支持(推荐使用在短文本、有数字后缀查找的场景。后缀长度为3-12)
	EnableCamelMatch        *bool `json:"enable_camel_match,omitempty"`         // 是否支持驼峰英文匹配。默认不支持(推荐使用在短文本,且包含驼峰形式英文的查找场景)
}

type SchemaSearchOptionsBuilder

type SchemaSearchOptionsBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaSearchOptionsBuilder

func NewSchemaSearchOptionsBuilder() *SchemaSearchOptionsBuilder

func (*SchemaSearchOptionsBuilder) Build

func (*SchemaSearchOptionsBuilder) EnableCamelMatch

func (builder *SchemaSearchOptionsBuilder) EnableCamelMatch(enableCamelMatch bool) *SchemaSearchOptionsBuilder

是否支持驼峰英文匹配。默认不支持(推荐使用在短文本,且包含驼峰形式英文的查找场景)

示例值:false

func (*SchemaSearchOptionsBuilder) EnableExactMatch

func (builder *SchemaSearchOptionsBuilder) EnableExactMatch(enableExactMatch bool) *SchemaSearchOptionsBuilder

是否支持精确匹配。默认不支持(推荐使用在短文本、需要精确查找的场景)

示例值:false

func (*SchemaSearchOptionsBuilder) EnableNumberSuffixMatch

func (builder *SchemaSearchOptionsBuilder) EnableNumberSuffixMatch(enableNumberSuffixMatch bool) *SchemaSearchOptionsBuilder

是否支持数据后缀匹配。默认不支持(推荐使用在短文本、有数字后缀查找的场景。后缀长度为3-12)

示例值:false

func (*SchemaSearchOptionsBuilder) EnablePrefixMatch

func (builder *SchemaSearchOptionsBuilder) EnablePrefixMatch(enablePrefixMatch bool) *SchemaSearchOptionsBuilder

是否支持前缀匹配(短文本的默认的分词/召回策略。前缀长度为 1-12)

示例值:false

func (*SchemaSearchOptionsBuilder) EnableSemanticMatch

func (builder *SchemaSearchOptionsBuilder) EnableSemanticMatch(enableSemanticMatch bool) *SchemaSearchOptionsBuilder

是否支持语义切词召回。默认不支持(推荐使用在长文本的场景)

示例值:true

type SchemaSortOptions

type SchemaSortOptions struct {
	Priority *int    `json:"priority,omitempty"` // 排序的优先级,可选范围为 0~4,0为最高优先级。如果优先级相同,则随机进行排序。默认为0
	Order    *string `json:"order,omitempty"`    // 排序的顺序。默认为 desc
}

type SchemaSortOptionsBuilder

type SchemaSortOptionsBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaSortOptionsBuilder

func NewSchemaSortOptionsBuilder() *SchemaSortOptionsBuilder

func (*SchemaSortOptionsBuilder) Build

func (builder *SchemaSortOptionsBuilder) Build() *SchemaSortOptions

func (*SchemaSortOptionsBuilder) Order

排序的顺序。默认为 desc

示例值:asc

func (*SchemaSortOptionsBuilder) Priority

func (builder *SchemaSortOptionsBuilder) Priority(priority int) *SchemaSortOptionsBuilder

排序的优先级,可选范围为 0~4,0为最高优先级。如果优先级相同,则随机进行排序。默认为0

示例值:0

type SchemaTagOptions

type SchemaTagOptions struct {
	Name  *string `json:"name,omitempty"`  // tag 对应的枚举值名称
	Color *string `json:"color,omitempty"` // 标签对应的颜色
	Text  *string `json:"text,omitempty"`  // 标签中展示的文本
}

type SchemaTagOptionsBuilder

type SchemaTagOptionsBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaTagOptionsBuilder

func NewSchemaTagOptionsBuilder() *SchemaTagOptionsBuilder

func (*SchemaTagOptionsBuilder) Build

func (builder *SchemaTagOptionsBuilder) Build() *SchemaTagOptions

func (*SchemaTagOptionsBuilder) Color

标签对应的颜色

示例值:blue

func (*SchemaTagOptionsBuilder) Name

tag 对应的枚举值名称

示例值:status

func (*SchemaTagOptionsBuilder) Text

标签中展示的文本

示例值:PASS

type SchemaTypeDefinitions

type SchemaTypeDefinitions struct {
	Tag []*SchemaTagOptions `json:"tag,omitempty"` // 标签类型的定义
}

type SchemaTypeDefinitionsBuilder

type SchemaTypeDefinitionsBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaTypeDefinitionsBuilder

func NewSchemaTypeDefinitionsBuilder() *SchemaTypeDefinitionsBuilder

func (*SchemaTypeDefinitionsBuilder) Build

func (*SchemaTypeDefinitionsBuilder) Tag

标签类型的定义

示例值:

type SearchService

type SearchService struct {
	DataSource     *dataSource     // 数据源
	DataSourceItem *dataSourceItem // 数据项
	Schema         *schema         // 数据范式
	// contains filtered or unexported fields
}

func NewService

func NewService(config *larkcore.Config) *SearchService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL