Class v1beta.SearchServiceClient (0.6.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 gax.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: 'rest'}, 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;
    };

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 protos.google.cloud.discoveryengine.v1beta.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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>
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 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>
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 protos.google.cloud.discoveryengine.v1beta.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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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'
  /**
   *  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 will be 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. Document can be ordered by
   *  a field in an Document google.cloud.discoveryengine.v1beta.Document 
   *  object. Leave it unset if ordered by relevance. OrderBy expression is
   *  case-sensitive.
   *  If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
   */
  // const orderBy = 'abc123'
  /**
   *  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 = 1234
  /**
   *  Boost specification to boost certain documents.
   */
  // const boostSpec = {}
  /**
   *  Additional search parameters.
   *  For
   *  IndustryVertical.SITE_SEARCH google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH 
   *  vertical, 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.
   *  This field is ignored for other verticals.
   */
  // const params = 1234
  /**
   *  The query expansion specification that specifies the conditions under which
   *  query expansion will occur.
   */
  // const queryExpansionSpec = {}
  /**
   *  The spell correction specification that specifies the mode under
   *  which spell correction will take 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'
  /**
   *  The content search spec that configs the desired behavior of content
   *  search.
   */
  // const contentSearchSpec = {}

  // 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 protos.google.cloud.discoveryengine.v1beta.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.