searchapi

package
v0.0.0-...-204702d Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebSearchAsyncService_Search_FullMethodName = "/yandex.cloud.searchapi.v2.WebSearchAsyncService/Search"
)

Variables

View Source
var (
	SearchQuery_SearchType_name = map[int32]string{
		0: "SEARCH_TYPE_UNSPECIFIED",
		1: "SEARCH_TYPE_RU",
		2: "SEARCH_TYPE_TR",
		3: "SEARCH_TYPE_COM",
	}
	SearchQuery_SearchType_value = map[string]int32{
		"SEARCH_TYPE_UNSPECIFIED": 0,
		"SEARCH_TYPE_RU":          1,
		"SEARCH_TYPE_TR":          2,
		"SEARCH_TYPE_COM":         3,
	}
)

Enum value maps for SearchQuery_SearchType.

View Source
var (
	SearchQuery_FamilyMode_name = map[int32]string{
		0: "FAMILY_MODE_UNSPECIFIED",
		1: "FAMILY_MODE_NONE",
		2: "FAMILY_MODE_MODERATE",
		3: "FAMILY_MODE_STRICT",
	}
	SearchQuery_FamilyMode_value = map[string]int32{
		"FAMILY_MODE_UNSPECIFIED": 0,
		"FAMILY_MODE_NONE":        1,
		"FAMILY_MODE_MODERATE":    2,
		"FAMILY_MODE_STRICT":      3,
	}
)

Enum value maps for SearchQuery_FamilyMode.

View Source
var (
	SortSpec_SortOrder_name = map[int32]string{
		0: "SORT_ORDER_UNSPECIFIED",
		1: "SORT_ORDER_ASC",
		2: "SORT_ORDER_DESC",
	}
	SortSpec_SortOrder_value = map[string]int32{
		"SORT_ORDER_UNSPECIFIED": 0,
		"SORT_ORDER_ASC":         1,
		"SORT_ORDER_DESC":        2,
	}
)

Enum value maps for SortSpec_SortOrder.

View Source
var (
	SortSpec_SortMode_name = map[int32]string{
		0: "SORT_MODE_UNSPECIFIED",
		1: "SORT_MODE_BY_RELEVANCE",
		2: "SORT_MODE_BY_TIME",
	}
	SortSpec_SortMode_value = map[string]int32{
		"SORT_MODE_UNSPECIFIED":  0,
		"SORT_MODE_BY_RELEVANCE": 1,
		"SORT_MODE_BY_TIME":      2,
	}
)

Enum value maps for SortSpec_SortMode.

View Source
var (
	GroupSpec_GroupMode_name = map[int32]string{
		0: "GROUP_MODE_UNSPECIFIED",
		1: "GROUP_MODE_FLAT",
		2: "GROUP_MODE_DEEP",
	}
	GroupSpec_GroupMode_value = map[string]int32{
		"GROUP_MODE_UNSPECIFIED": 0,
		"GROUP_MODE_FLAT":        1,
		"GROUP_MODE_DEEP":        2,
	}
)

Enum value maps for GroupSpec_GroupMode.

View Source
var (
	WebSearchRequest_Localization_name = map[int32]string{
		0: "LOCALIZATION_UNSPECIFIED",
		1: "LOCALIZATION_RU",
		2: "LOCALIZATION_UK",
		3: "LOCALIZATION_BE",
		4: "LOCALIZATION_KK",
		5: "LOCALIZATION_TR",
		6: "LOCALIZATION_EN",
	}
	WebSearchRequest_Localization_value = map[string]int32{
		"LOCALIZATION_UNSPECIFIED": 0,
		"LOCALIZATION_RU":          1,
		"LOCALIZATION_UK":          2,
		"LOCALIZATION_BE":          3,
		"LOCALIZATION_KK":          4,
		"LOCALIZATION_TR":          5,
		"LOCALIZATION_EN":          6,
	}
)

Enum value maps for WebSearchRequest_Localization.

View Source
var File_yandex_cloud_searchapi_v2_search_query_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_searchapi_v2_search_service_proto protoreflect.FileDescriptor
View Source
var WebSearchAsyncService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.searchapi.v2.WebSearchAsyncService",
	HandlerType: (*WebSearchAsyncServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Search",
			Handler:    _WebSearchAsyncService_Search_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/searchapi/v2/search_service.proto",
}

WebSearchAsyncService_ServiceDesc is the grpc.ServiceDesc for WebSearchAsyncService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWebSearchAsyncServiceServer

func RegisterWebSearchAsyncServiceServer(s grpc.ServiceRegistrar, srv WebSearchAsyncServiceServer)

Types

type GroupSpec

type GroupSpec struct {

	// Grouping method.
	GroupMode GroupSpec_GroupMode `` /* 140-byte string literal not displayed */
	// Maximum number of groups that can be returned per page with search results.
	GroupsOnPage int64 `protobuf:"varint,2,opt,name=groups_on_page,json=groupsOnPage,proto3" json:"groups_on_page,omitempty"`
	// Maximum number of documents that can be returned per group.
	DocsInGroup int64 `protobuf:"varint,3,opt,name=docs_in_group,json=docsInGroup,proto3" json:"docs_in_group,omitempty"`
	// contains filtered or unexported fields
}

func (*GroupSpec) Descriptor deprecated

func (*GroupSpec) Descriptor() ([]byte, []int)

Deprecated: Use GroupSpec.ProtoReflect.Descriptor instead.

func (*GroupSpec) GetDocsInGroup

func (x *GroupSpec) GetDocsInGroup() int64

func (*GroupSpec) GetGroupMode

func (x *GroupSpec) GetGroupMode() GroupSpec_GroupMode

func (*GroupSpec) GetGroupsOnPage

func (x *GroupSpec) GetGroupsOnPage() int64

func (*GroupSpec) ProtoMessage

func (*GroupSpec) ProtoMessage()

func (*GroupSpec) ProtoReflect

func (x *GroupSpec) ProtoReflect() protoreflect.Message

func (*GroupSpec) Reset

func (x *GroupSpec) Reset()

func (*GroupSpec) SetDocsInGroup

func (m *GroupSpec) SetDocsInGroup(v int64)

func (*GroupSpec) SetGroupMode

func (m *GroupSpec) SetGroupMode(v GroupSpec_GroupMode)

func (*GroupSpec) SetGroupsOnPage

func (m *GroupSpec) SetGroupsOnPage(v int64)

func (*GroupSpec) String

func (x *GroupSpec) String() string

type GroupSpec_GroupMode

type GroupSpec_GroupMode int32
const (
	GroupSpec_GROUP_MODE_UNSPECIFIED GroupSpec_GroupMode = 0
	// Flat grouping. Each group contains a single document.
	GroupSpec_GROUP_MODE_FLAT GroupSpec_GroupMode = 1
	// Grouping by domain. Each group contains documents from one domain.
	GroupSpec_GROUP_MODE_DEEP GroupSpec_GroupMode = 2
)

func (GroupSpec_GroupMode) Descriptor

func (GroupSpec_GroupMode) Enum

func (GroupSpec_GroupMode) EnumDescriptor deprecated

func (GroupSpec_GroupMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use GroupSpec_GroupMode.Descriptor instead.

func (GroupSpec_GroupMode) Number

func (GroupSpec_GroupMode) String

func (x GroupSpec_GroupMode) String() string

func (GroupSpec_GroupMode) Type

type SearchQuery

type SearchQuery struct {

	// Search type that determines the domain name that will be used for the search queries.
	SearchType SearchQuery_SearchType `` /* 146-byte string literal not displayed */
	// Search query text
	QueryText string `protobuf:"bytes,2,opt,name=query_text,json=queryText,proto3" json:"query_text,omitempty"`
	// Rule for filtering search results and determines whether any documents should be excluded.
	FamilyMode SearchQuery_FamilyMode `` /* 146-byte string literal not displayed */
	// The number of a requested page with search results
	Page int64 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchQuery) Descriptor deprecated

func (*SearchQuery) Descriptor() ([]byte, []int)

Deprecated: Use SearchQuery.ProtoReflect.Descriptor instead.

func (*SearchQuery) GetFamilyMode

func (x *SearchQuery) GetFamilyMode() SearchQuery_FamilyMode

func (*SearchQuery) GetPage

func (x *SearchQuery) GetPage() int64

func (*SearchQuery) GetQueryText

func (x *SearchQuery) GetQueryText() string

func (*SearchQuery) GetSearchType

func (x *SearchQuery) GetSearchType() SearchQuery_SearchType

func (*SearchQuery) ProtoMessage

func (*SearchQuery) ProtoMessage()

func (*SearchQuery) ProtoReflect

func (x *SearchQuery) ProtoReflect() protoreflect.Message

func (*SearchQuery) Reset

func (x *SearchQuery) Reset()

func (*SearchQuery) SetFamilyMode

func (m *SearchQuery) SetFamilyMode(v SearchQuery_FamilyMode)

func (*SearchQuery) SetPage

func (m *SearchQuery) SetPage(v int64)

func (*SearchQuery) SetQueryText

func (m *SearchQuery) SetQueryText(v string)

func (*SearchQuery) SetSearchType

func (m *SearchQuery) SetSearchType(v SearchQuery_SearchType)

func (*SearchQuery) String

func (x *SearchQuery) String() string

type SearchQuery_FamilyMode

type SearchQuery_FamilyMode int32
const (
	SearchQuery_FAMILY_MODE_UNSPECIFIED SearchQuery_FamilyMode = 0
	// Filtering is disabled. Search results include any documents regardless of their contents.
	SearchQuery_FAMILY_MODE_NONE SearchQuery_FamilyMode = 1
	// Moderate filter (default value). Documents of the Adult category are excluded from search results
	// unless a query is explicitly made for searching resources of this category.
	SearchQuery_FAMILY_MODE_MODERATE SearchQuery_FamilyMode = 2
	// Regardless of a search query, documents of the Adult category
	// and those with profanity are excluded from search results.
	SearchQuery_FAMILY_MODE_STRICT SearchQuery_FamilyMode = 3
)

func (SearchQuery_FamilyMode) Descriptor

func (SearchQuery_FamilyMode) Enum

func (SearchQuery_FamilyMode) EnumDescriptor deprecated

func (SearchQuery_FamilyMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use SearchQuery_FamilyMode.Descriptor instead.

func (SearchQuery_FamilyMode) Number

func (SearchQuery_FamilyMode) String

func (x SearchQuery_FamilyMode) String() string

func (SearchQuery_FamilyMode) Type

type SearchQuery_SearchType

type SearchQuery_SearchType int32
const (
	SearchQuery_SEARCH_TYPE_UNSPECIFIED SearchQuery_SearchType = 0
	// Russian search type (default), yandex.ru search domain name will be used.
	SearchQuery_SEARCH_TYPE_RU SearchQuery_SearchType = 1
	// Turkish search type, yandex.tr search domain name will be used.
	SearchQuery_SEARCH_TYPE_TR SearchQuery_SearchType = 2
	// International search type, yandex.com search domain name will be used.
	SearchQuery_SEARCH_TYPE_COM SearchQuery_SearchType = 3
)

func (SearchQuery_SearchType) Descriptor

func (SearchQuery_SearchType) Enum

func (SearchQuery_SearchType) EnumDescriptor deprecated

func (SearchQuery_SearchType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SearchQuery_SearchType.Descriptor instead.

func (SearchQuery_SearchType) Number

func (SearchQuery_SearchType) String

func (x SearchQuery_SearchType) String() string

func (SearchQuery_SearchType) Type

type SortSpec

type SortSpec struct {

	// Documents sorting mode.
	SortMode SortSpec_SortMode `` /* 135-byte string literal not displayed */
	// Documents sorting order.
	SortOrder SortSpec_SortOrder `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SortSpec) Descriptor deprecated

func (*SortSpec) Descriptor() ([]byte, []int)

Deprecated: Use SortSpec.ProtoReflect.Descriptor instead.

func (*SortSpec) GetSortMode

func (x *SortSpec) GetSortMode() SortSpec_SortMode

func (*SortSpec) GetSortOrder

func (x *SortSpec) GetSortOrder() SortSpec_SortOrder

func (*SortSpec) ProtoMessage

func (*SortSpec) ProtoMessage()

func (*SortSpec) ProtoReflect

func (x *SortSpec) ProtoReflect() protoreflect.Message

func (*SortSpec) Reset

func (x *SortSpec) Reset()

func (*SortSpec) SetSortMode

func (m *SortSpec) SetSortMode(v SortSpec_SortMode)

func (*SortSpec) SetSortOrder

func (m *SortSpec) SetSortOrder(v SortSpec_SortOrder)

func (*SortSpec) String

func (x *SortSpec) String() string

type SortSpec_SortMode

type SortSpec_SortMode int32
const (
	SortSpec_SORT_MODE_UNSPECIFIED SortSpec_SortMode = 0
	// Sort documents by relevance (default value).
	SortSpec_SORT_MODE_BY_RELEVANCE SortSpec_SortMode = 1
	// Sort documents by update time.
	SortSpec_SORT_MODE_BY_TIME SortSpec_SortMode = 2
)

func (SortSpec_SortMode) Descriptor

func (SortSpec_SortMode) Enum

func (SortSpec_SortMode) EnumDescriptor deprecated

func (SortSpec_SortMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use SortSpec_SortMode.Descriptor instead.

func (SortSpec_SortMode) Number

func (SortSpec_SortMode) String

func (x SortSpec_SortMode) String() string

func (SortSpec_SortMode) Type

type SortSpec_SortOrder

type SortSpec_SortOrder int32
const (
	SortSpec_SORT_ORDER_UNSPECIFIED SortSpec_SortOrder = 0
	// Direct order from most recent to oldest (default)..
	SortSpec_SORT_ORDER_ASC SortSpec_SortOrder = 1
	// Reverse order from oldest to most recent.
	SortSpec_SORT_ORDER_DESC SortSpec_SortOrder = 2
)

func (SortSpec_SortOrder) Descriptor

func (SortSpec_SortOrder) Enum

func (SortSpec_SortOrder) EnumDescriptor deprecated

func (SortSpec_SortOrder) EnumDescriptor() ([]byte, []int)

Deprecated: Use SortSpec_SortOrder.Descriptor instead.

func (SortSpec_SortOrder) Number

func (SortSpec_SortOrder) String

func (x SortSpec_SortOrder) String() string

func (SortSpec_SortOrder) Type

type UnimplementedWebSearchAsyncServiceServer

type UnimplementedWebSearchAsyncServiceServer struct{}

UnimplementedWebSearchAsyncServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedWebSearchAsyncServiceServer) Search

type UnsafeWebSearchAsyncServiceServer

type UnsafeWebSearchAsyncServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeWebSearchAsyncServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WebSearchAsyncServiceServer will result in compilation errors.

type WebSearchAsyncServiceClient

type WebSearchAsyncServiceClient interface {
	Search(ctx context.Context, in *WebSearchRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

WebSearchAsyncServiceClient is the client API for WebSearchAsyncService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

A set of methods for async search the Yandex search database.

type WebSearchAsyncServiceServer

type WebSearchAsyncServiceServer interface {
	Search(context.Context, *WebSearchRequest) (*operation.Operation, error)
}

WebSearchAsyncServiceServer is the server API for WebSearchAsyncService service. All implementations should embed UnimplementedWebSearchAsyncServiceServer for forward compatibility.

A set of methods for async search the Yandex search database.

type WebSearchRequest

type WebSearchRequest struct {

	// Search query.
	Query *SearchQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// The rules for sorting search results that define the sequence of the returned search results.
	SortSpec *SortSpec `protobuf:"bytes,2,opt,name=sort_spec,json=sortSpec,proto3" json:"sort_spec,omitempty"`
	// Grouping settings that are used to group documents from a single domain into a container.
	GroupSpec *GroupSpec `protobuf:"bytes,3,opt,name=group_spec,json=groupSpec,proto3" json:"group_spec,omitempty"`
	// The maximum number of passages that can be used when generating a document snippet.
	MaxPassages int64 `protobuf:"varint,4,opt,name=max_passages,json=maxPassages,proto3" json:"max_passages,omitempty"`
	// ID of the search country or region that impacts the document ranking rules.
	Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty"`
	// The notification language for a search response.
	L10N WebSearchRequest_Localization `protobuf:"varint,6,opt,name=l10n,proto3,enum=yandex.cloud.searchapi.v2.WebSearchRequest_Localization" json:"l10n,omitempty"`
	// ID of the folder.
	FolderId string `protobuf:"bytes,7,opt,name=folder_id,json=folderId,proto3" json:"folder_id,omitempty"`
	// contains filtered or unexported fields
}

func (*WebSearchRequest) Descriptor deprecated

func (*WebSearchRequest) Descriptor() ([]byte, []int)

Deprecated: Use WebSearchRequest.ProtoReflect.Descriptor instead.

func (*WebSearchRequest) GetFolderId

func (x *WebSearchRequest) GetFolderId() string

func (*WebSearchRequest) GetGroupSpec

func (x *WebSearchRequest) GetGroupSpec() *GroupSpec

func (*WebSearchRequest) GetL10N

func (*WebSearchRequest) GetMaxPassages

func (x *WebSearchRequest) GetMaxPassages() int64

func (*WebSearchRequest) GetQuery

func (x *WebSearchRequest) GetQuery() *SearchQuery

func (*WebSearchRequest) GetRegion

func (x *WebSearchRequest) GetRegion() string

func (*WebSearchRequest) GetSortSpec

func (x *WebSearchRequest) GetSortSpec() *SortSpec

func (*WebSearchRequest) ProtoMessage

func (*WebSearchRequest) ProtoMessage()

func (*WebSearchRequest) ProtoReflect

func (x *WebSearchRequest) ProtoReflect() protoreflect.Message

func (*WebSearchRequest) Reset

func (x *WebSearchRequest) Reset()

func (*WebSearchRequest) SetFolderId

func (m *WebSearchRequest) SetFolderId(v string)

func (*WebSearchRequest) SetGroupSpec

func (m *WebSearchRequest) SetGroupSpec(v *GroupSpec)

func (*WebSearchRequest) SetL10N

func (*WebSearchRequest) SetMaxPassages

func (m *WebSearchRequest) SetMaxPassages(v int64)

func (*WebSearchRequest) SetQuery

func (m *WebSearchRequest) SetQuery(v *SearchQuery)

func (*WebSearchRequest) SetRegion

func (m *WebSearchRequest) SetRegion(v string)

func (*WebSearchRequest) SetSortSpec

func (m *WebSearchRequest) SetSortSpec(v *SortSpec)

func (*WebSearchRequest) String

func (x *WebSearchRequest) String() string

type WebSearchRequest_Localization

type WebSearchRequest_Localization int32
const (
	WebSearchRequest_LOCALIZATION_UNSPECIFIED WebSearchRequest_Localization = 0
	// Russian (default value)
	WebSearchRequest_LOCALIZATION_RU WebSearchRequest_Localization = 1
	// Ukrainian
	WebSearchRequest_LOCALIZATION_UK WebSearchRequest_Localization = 2
	// Belarusian
	WebSearchRequest_LOCALIZATION_BE WebSearchRequest_Localization = 3
	// Kazakh
	WebSearchRequest_LOCALIZATION_KK WebSearchRequest_Localization = 4
	// Turkish
	WebSearchRequest_LOCALIZATION_TR WebSearchRequest_Localization = 5
	// English
	WebSearchRequest_LOCALIZATION_EN WebSearchRequest_Localization = 6
)

func (WebSearchRequest_Localization) Descriptor

func (WebSearchRequest_Localization) Enum

func (WebSearchRequest_Localization) EnumDescriptor deprecated

func (WebSearchRequest_Localization) EnumDescriptor() ([]byte, []int)

Deprecated: Use WebSearchRequest_Localization.Descriptor instead.

func (WebSearchRequest_Localization) Number

func (WebSearchRequest_Localization) String

func (WebSearchRequest_Localization) Type

type WebSearchResponse

type WebSearchResponse struct {

	// Search results, usually in XML format.
	RawData []byte `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"`
	// contains filtered or unexported fields
}

func (*WebSearchResponse) Descriptor deprecated

func (*WebSearchResponse) Descriptor() ([]byte, []int)

Deprecated: Use WebSearchResponse.ProtoReflect.Descriptor instead.

func (*WebSearchResponse) GetRawData

func (x *WebSearchResponse) GetRawData() []byte

func (*WebSearchResponse) ProtoMessage

func (*WebSearchResponse) ProtoMessage()

func (*WebSearchResponse) ProtoReflect

func (x *WebSearchResponse) ProtoReflect() protoreflect.Message

func (*WebSearchResponse) Reset

func (x *WebSearchResponse) Reset()

func (*WebSearchResponse) SetRawData

func (m *WebSearchResponse) SetRawData(v []byte)

func (*WebSearchResponse) String

func (x *WebSearchResponse) String() string

Jump to

Keyboard shortcuts

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