Class v1beta.SearchServiceClient (1.2.0)

Service for search. v1beta

Package

@google-cloud/discoveryengine

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of SearchServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new SearchServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

searchServiceStub

searchServiceStub?: Promise<{
        [name: string]: Function;
    }>;

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName)

matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;

Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchDocumentName string

A fully-qualified path representing project_location_collection_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the branch.

matchBranchFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName)

matchBranchFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName: string): string | number;

Parse the branch from ProjectLocationCollectionDataStoreBranch resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchName string

A fully-qualified path representing project_location_collection_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the branch.

matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName)

matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;

Parse the branch from ProjectLocationDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationDataStoreBranchDocumentName string

A fully-qualified path representing project_location_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the branch.

matchBranchFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName)

matchBranchFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName: string): string | number;

Parse the branch from ProjectLocationDataStoreBranch resource.

Parameter
NameDescription
projectLocationDataStoreBranchName string

A fully-qualified path representing project_location_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the branch.

matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName)

matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;

Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchDocumentName string

A fully-qualified path representing project_location_collection_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the collection.

matchCollectionFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName)

matchCollectionFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName: string): string | number;

Parse the collection from ProjectLocationCollectionDataStoreBranch resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchName string

A fully-qualified path representing project_location_collection_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the collection.

matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName)

matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;

Parse the collection from ProjectLocationCollectionDataStoreConversation resource.

Parameter
NameDescription
projectLocationCollectionDataStoreConversationName string

A fully-qualified path representing project_location_collection_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the collection.

matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName)

matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;

Parse the collection from ProjectLocationCollectionDataStoreSchema resource.

Parameter
NameDescription
projectLocationCollectionDataStoreSchemaName string

A fully-qualified path representing project_location_collection_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the collection.

matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName)

matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName: string): string | number;

Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationCollectionDataStoreServingConfigName string

A fully-qualified path representing project_location_collection_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the collection.

matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName)

matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;

Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.

Parameter
NameDescription
projectLocationCollectionDataStoreConversationName string

A fully-qualified path representing project_location_collection_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the conversation.

matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName)

matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;

Parse the conversation from ProjectLocationDataStoreConversation resource.

Parameter
NameDescription
projectLocationDataStoreConversationName string

A fully-qualified path representing project_location_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the conversation.

matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName)

matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;

Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchDocumentName string

A fully-qualified path representing project_location_collection_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName)

matchDataStoreFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName: string): string | number;

Parse the data_store from ProjectLocationCollectionDataStoreBranch resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchName string

A fully-qualified path representing project_location_collection_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName)

matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;

Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.

Parameter
NameDescription
projectLocationCollectionDataStoreConversationName string

A fully-qualified path representing project_location_collection_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName)

matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;

Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.

Parameter
NameDescription
projectLocationCollectionDataStoreSchemaName string

A fully-qualified path representing project_location_collection_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName)

matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName: string): string | number;

Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationCollectionDataStoreServingConfigName string

A fully-qualified path representing project_location_collection_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName)

matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;

Parse the data_store from ProjectLocationDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationDataStoreBranchDocumentName string

A fully-qualified path representing project_location_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName)

matchDataStoreFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName: string): string | number;

Parse the data_store from ProjectLocationDataStoreBranch resource.

Parameter
NameDescription
projectLocationDataStoreBranchName string

A fully-qualified path representing project_location_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName)

matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;

Parse the data_store from ProjectLocationDataStoreConversation resource.

Parameter
NameDescription
projectLocationDataStoreConversationName string

A fully-qualified path representing project_location_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName)

matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;

Parse the data_store from ProjectLocationDataStoreSchema resource.

Parameter
NameDescription
projectLocationDataStoreSchemaName string

A fully-qualified path representing project_location_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName)

matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName: string): string | number;

Parse the data_store from ProjectLocationDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationDataStoreServingConfigName string

A fully-qualified path representing project_location_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the data_store.

matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName)

matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;

Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchDocumentName string

A fully-qualified path representing project_location_collection_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the document.

matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName)

matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;

Parse the document from ProjectLocationDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationDataStoreBranchDocumentName string

A fully-qualified path representing project_location_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the document.

matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName)

matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;

Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchDocumentName string

A fully-qualified path representing project_location_collection_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName)

matchLocationFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName: string): string | number;

Parse the location from ProjectLocationCollectionDataStoreBranch resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchName string

A fully-qualified path representing project_location_collection_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName)

matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;

Parse the location from ProjectLocationCollectionDataStoreConversation resource.

Parameter
NameDescription
projectLocationCollectionDataStoreConversationName string

A fully-qualified path representing project_location_collection_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName)

matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;

Parse the location from ProjectLocationCollectionDataStoreSchema resource.

Parameter
NameDescription
projectLocationCollectionDataStoreSchemaName string

A fully-qualified path representing project_location_collection_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName)

matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName: string): string | number;

Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationCollectionDataStoreServingConfigName string

A fully-qualified path representing project_location_collection_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName)

matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;

Parse the location from ProjectLocationDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationDataStoreBranchDocumentName string

A fully-qualified path representing project_location_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName)

matchLocationFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName: string): string | number;

Parse the location from ProjectLocationDataStoreBranch resource.

Parameter
NameDescription
projectLocationDataStoreBranchName string

A fully-qualified path representing project_location_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName)

matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;

Parse the location from ProjectLocationDataStoreConversation resource.

Parameter
NameDescription
projectLocationDataStoreConversationName string

A fully-qualified path representing project_location_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName)

matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;

Parse the location from ProjectLocationDataStoreSchema resource.

Parameter
NameDescription
projectLocationDataStoreSchemaName string

A fully-qualified path representing project_location_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName)

matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName: string): string | number;

Parse the location from ProjectLocationDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationDataStoreServingConfigName string

A fully-qualified path representing project_location_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName)

matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;

Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchDocumentName string

A fully-qualified path representing project_location_collection_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName)

matchProjectFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName: string): string | number;

Parse the project from ProjectLocationCollectionDataStoreBranch resource.

Parameter
NameDescription
projectLocationCollectionDataStoreBranchName string

A fully-qualified path representing project_location_collection_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName)

matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;

Parse the project from ProjectLocationCollectionDataStoreConversation resource.

Parameter
NameDescription
projectLocationCollectionDataStoreConversationName string

A fully-qualified path representing project_location_collection_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName)

matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;

Parse the project from ProjectLocationCollectionDataStoreSchema resource.

Parameter
NameDescription
projectLocationCollectionDataStoreSchemaName string

A fully-qualified path representing project_location_collection_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName)

matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName: string): string | number;

Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationCollectionDataStoreServingConfigName string

A fully-qualified path representing project_location_collection_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName)

matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;

Parse the project from ProjectLocationDataStoreBranchDocument resource.

Parameter
NameDescription
projectLocationDataStoreBranchDocumentName string

A fully-qualified path representing project_location_data_store_branch_document resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName)

matchProjectFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName: string): string | number;

Parse the project from ProjectLocationDataStoreBranch resource.

Parameter
NameDescription
projectLocationDataStoreBranchName string

A fully-qualified path representing project_location_data_store_branch resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName)

matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;

Parse the project from ProjectLocationDataStoreConversation resource.

Parameter
NameDescription
projectLocationDataStoreConversationName string

A fully-qualified path representing project_location_data_store_conversation resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName)

matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;

Parse the project from ProjectLocationDataStoreSchema resource.

Parameter
NameDescription
projectLocationDataStoreSchemaName string

A fully-qualified path representing project_location_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName)

matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName: string): string | number;

Parse the project from ProjectLocationDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationDataStoreServingConfigName string

A fully-qualified path representing project_location_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName)

matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;

Parse the schema from ProjectLocationCollectionDataStoreSchema resource.

Parameter
NameDescription
projectLocationCollectionDataStoreSchemaName string

A fully-qualified path representing project_location_collection_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the schema.

matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName)

matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;

Parse the schema from ProjectLocationDataStoreSchema resource.

Parameter
NameDescription
projectLocationDataStoreSchemaName string

A fully-qualified path representing project_location_data_store_schema resource.

Returns
TypeDescription
string | number

{string} A string representing the schema.

matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName)

matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName: string): string | number;

Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationCollectionDataStoreServingConfigName string

A fully-qualified path representing project_location_collection_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the serving_config.

matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName)

matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName: string): string | number;

Parse the serving_config from ProjectLocationDataStoreServingConfig resource.

Parameter
NameDescription
projectLocationDataStoreServingConfigName string

A fully-qualified path representing project_location_data_store_serving_config resource.

Returns
TypeDescription
string | number

{string} A string representing the serving_config.

projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document)

projectLocationCollectionDataStoreBranchDocumentPath(project: string, location: string, collection: string, dataStore: string, branch: string, document: string): string;

Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.

Parameters
NameDescription
project string
location string
collection string
dataStore string
branch string
document string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationCollectionDataStoreBranchPath(project, location, collection, dataStore, branch)

projectLocationCollectionDataStoreBranchPath(project: string, location: string, collection: string, dataStore: string, branch: string): string;

Return a fully-qualified projectLocationCollectionDataStoreBranch resource name string.

Parameters
NameDescription
project string
location string
collection string
dataStore string
branch string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation)

projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;

Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.

Parameters
NameDescription
project string
location string
collection string
dataStore string
conversation string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema)

projectLocationCollectionDataStoreSchemaPath(project: string, location: string, collection: string, dataStore: string, schema: string): string;

Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.

Parameters
NameDescription
project string
location string
collection string
dataStore string
schema string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig)

projectLocationCollectionDataStoreServingConfigPath(project: string, location: string, collection: string, dataStore: string, servingConfig: string): string;

Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.

Parameters
NameDescription
project string
location string
collection string
dataStore string
servingConfig string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document)

projectLocationDataStoreBranchDocumentPath(project: string, location: string, dataStore: string, branch: string, document: string): string;

Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.

Parameters
NameDescription
project string
location string
dataStore string
branch string
document string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDataStoreBranchPath(project, location, dataStore, branch)

projectLocationDataStoreBranchPath(project: string, location: string, dataStore: string, branch: string): string;

Return a fully-qualified projectLocationDataStoreBranch resource name string.

Parameters
NameDescription
project string
location string
dataStore string
branch string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDataStoreConversationPath(project, location, dataStore, conversation)

projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;

Return a fully-qualified projectLocationDataStoreConversation resource name string.

Parameters
NameDescription
project string
location string
dataStore string
conversation string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDataStoreSchemaPath(project, location, dataStore, schema)

projectLocationDataStoreSchemaPath(project: string, location: string, dataStore: string, schema: string): string;

Return a fully-qualified projectLocationDataStoreSchema resource name string.

Parameters
NameDescription
project string
location string
dataStore string
schema string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig)

projectLocationDataStoreServingConfigPath(project: string, location: string, dataStore: string, servingConfig: string): string;

Return a fully-qualified projectLocationDataStoreServingConfig resource name string.

Parameters
NameDescription
project string
location string
dataStore string
servingConfig string
Returns
TypeDescription
string

{string} Resource name string.

search(request, options)

search(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Promise<[
        protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[],
        protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null,
        protos.google.cloud.discoveryengine.v1beta.ISearchResponse
    ]>;

Performs a search.

Parameters
NameDescription
request ISearchRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[], protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null, protos.google.cloud.discoveryengine.v1beta.ISearchResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using searchAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

search(request, options, callback)

search(request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>): void;
Parameters
NameDescription
request ISearchRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>
Returns
TypeDescription
void

search(request, callback)

search(request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, callback: PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>): void;
Parameters
NameDescription
request ISearchRequest
callback PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>
Returns
TypeDescription
void

searchAsync(request, options)

searchAsync(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>;

Equivalent to search, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request ISearchRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Search serving config, such as
   *  `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
   *  This field is used to identify the serving configuration name, set
   *  of models used to make the search.
   */
  // const servingConfig = 'abc123'
  /**
   *  The branch resource name, such as
   *  `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
   *  Use `default_branch` as the branch ID or leave this field empty, to search
   *  documents under the default branch.
   */
  // const branch = 'abc123'
  /**
   *  Raw search query.
   */
  // const query = 'abc123'
  /**
   *  Raw image query.
   */
  // const imageQuery = {}
  /**
   *  Maximum number of Document google.cloud.discoveryengine.v1beta.Document s
   *  to return. If unspecified, defaults to a reasonable value. The maximum
   *  allowed value is 100. Values above 100 are coerced to 100.
   *  If this field is negative, an  `INVALID_ARGUMENT`  is returned.
   */
  // const pageSize = 1234
  /**
   *  A page token received from a previous
   *  SearchService.Search google.cloud.discoveryengine.v1beta.SearchService.Search 
   *  call. Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to
   *  SearchService.Search google.cloud.discoveryengine.v1beta.SearchService.Search 
   *  must match the call that provided the page token. Otherwise, an
   *   `INVALID_ARGUMENT`  error is returned.
   */
  // const pageToken = 'abc123'
  /**
   *  A 0-indexed integer that specifies the current offset (that is, starting
   *  result location, amongst the
   *  Document google.cloud.discoveryengine.v1beta.Document s deemed by the API
   *  as relevant) in search results. This field is only considered if
   *  page_token google.cloud.discoveryengine.v1beta.SearchRequest.page_token 
   *  is unset.
   *  If this field is negative, an  `INVALID_ARGUMENT`  is returned.
   */
  // const offset = 1234
  /**
   *  The filter syntax consists of an expression language for constructing a
   *  predicate from one or more fields of the documents being filtered. Filter
   *  expression is case-sensitive.
   *  If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
   */
  // const filter = 'abc123'
  /**
   *  The order in which documents are returned. Documents can be ordered by
   *  a field in an Document google.cloud.discoveryengine.v1beta.Document 
   *  object. Leave it unset if ordered by relevance. `order_by` expression is
   *  case-sensitive.
   *  If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
   */
  // const orderBy = 'abc123'
  /**
   *  Information about the end user.
   *  Highly recommended for analytics.
   *  UserInfo.user_agent google.cloud.discoveryengine.v1beta.UserInfo.user_agent 
   *  is used to deduce `device_type` for analytics.
   */
  // const userInfo = {}
  /**
   *  Facet specifications for faceted search. If empty, no facets are returned.
   *  A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
   *  error is returned.
   */
  // const facetSpecs = [1,2,3,4]
  /**
   *  Boost specification to boost certain documents.
   */
  // const boostSpec = {}
  /**
   *  Additional search parameters.
   *  For public website search only, supported values are:
   *  * `user_country_code`: string. Default empty. If set to non-empty, results
   *     are restricted or boosted based on the location provided.
   *  * `search_type`: double. Default empty. Enables non-webpage searching
   *    depending on the value. The only valid non-default value is 1,
   *    which enables image searching.
   */
  // const params = [1,2,3,4]
  /**
   *  The query expansion specification that specifies the conditions under which
   *  query expansion occurs.
   */
  // const queryExpansionSpec = {}
  /**
   *  The spell correction specification that specifies the mode under
   *  which spell correction takes effect.
   */
  // const spellCorrectionSpec = {}
  /**
   *  A unique identifier for tracking visitors. For example, this could be
   *  implemented with an HTTP cookie, which should be able to uniquely identify
   *  a visitor on a single device. This unique identifier should not change if
   *  the visitor logs in or out of the website.
   *  This field should NOT have a fixed value such as `unknown_visitor`.
   *  This should be the same identifier as
   *  UserEvent.user_pseudo_id google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id 
   *  and
   *  CompleteQueryRequest.user_pseudo_id google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id 
   *  The field must be a UTF-8 encoded string with a length limit of 128
   *  characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
   */
  // const userPseudoId = 'abc123'
  /**
   *  A specification for configuring the behavior of content search.
   */
  // const contentSearchSpec = {}
  /**
   *  Uses the provided embedding to do additional semantic document retrieval.
   *  The retrieval is based on the dot product of
   *  SearchRequest.embedding_spec.embedding_vectors.vector   and the document
   *  embedding that is provided in
   *  SearchRequest.embedding_spec.embedding_vectors.field_path .
   *  If SearchRequest.embedding_spec.embedding_vectors.field_path   is not
   *  provided, it will use ServingConfig.embedding_config.field_paths .
   */
  // const embeddingSpec = {}
  /**
   *  The ranking expression controls the customized ranking on retrieval
   *  documents. This overrides ServingConfig.ranking_expression .
   *  The ranking expression is a single function or multiple functions that are
   *  joint by "+".
   *    * ranking_expression = function, { " + ", function };
   *  Supported functions:
   *    * double * relevance_score
   *    * double * dotProduct(embedding_field_path)
   *  Function variables:
   *    `relevance_score`: pre-defined keywords, used for measure relevance
   *    between query and document.
   *    `embedding_field_path`: the document embedding field
   *    used with query embedding vector.
   *    `dotProduct`: embedding function between embedding_field_path and query
   *    embedding vector.
   *   Example ranking expression:
   *     If document has an embedding field doc_embedding, the ranking expression
   *     could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
   */
  // const rankingExpression = 'abc123'
  /**
   *  Whether to turn on safe search. This is only supported for
   *  website search.
   */
  // const safeSearch = true
  /**
   *  The user labels applied to a resource must meet the following requirements:
   *  * Each resource can have multiple labels, up to a maximum of 64.
   *  * Each label must be a key-value pair.
   *  * Keys have a minimum length of 1 character and a maximum length of 63
   *    characters and cannot be empty. Values can be empty and have a maximum
   *    length of 63 characters.
   *  * Keys and values can contain only lowercase letters, numeric characters,
   *    underscores, and dashes. All characters must use UTF-8 encoding, and
   *    international characters are allowed.
   *  * The key portion of a label must be unique. However, you can use the same
   *    key with multiple resources.
   *  * Keys must start with a lowercase letter or international character.
   *  See Google Cloud
   *  Document (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
   *  for more details.
   */
  // const userLabels = [1,2,3,4]

  // Imports the Discoveryengine library
  const {SearchServiceClient} = require('@google-cloud/discoveryengine').v1beta;

  // Instantiates a client
  const discoveryengineClient = new SearchServiceClient();

  async function callSearch() {
    // Construct request
    const request = {
      servingConfig,
    };

    // Run request
    const iterable = await discoveryengineClient.searchAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callSearch();

searchStream(request, options)

searchStream(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request ISearchRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using searchAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.