snowflake.core.cortex.search_service.CortexSearchServiceApi¶

class snowflake.core.cortex.search_service.CortexSearchServiceApi(root, resource_class, sproc_client)¶

Bases: object

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech.

Do not edit the class manually.

Attributes

api_client¶

Methods

query_cortex_search_service(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], service_name: Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The name of the Cortex Search Service.')], query_request: QueryRequest | None = None, **kwargs) → QueryResponse¶

Query a Cortex Search Service. # noqa: E501.

Query a Cortex Search Service to get search results. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.query_cortex_search_service(database, var_schema, service_name, query_request, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param service_name: The name of the Cortex Search Service. (required)
:type service_name: str
:param query_request:
:type query_request: QueryRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: QueryResponse
Copy
query_cortex_search_service_with_http_info(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], service_name: Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The name of the Cortex Search Service.')], query_request: QueryRequest | None = None, **kwargs)¶

Query a Cortex Search Service. # noqa: E501.

Query a Cortex Search Service to get search results. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.query_cortex_search_service_with_http_info(database, var_schema, service_name, query_request, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param service_name: The name of the Cortex Search Service. (required)
:type service_name: str
:param query_request:
:type query_request: QueryRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
                               and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
                      request; this effectively ignores the authentication
                      in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: tuple(QueryResponse, status_code(int), headers(HTTPHeaderDict))
Copy