- Issue created by @tzura
When creating a search request, the Serving Config must be set:
$request = (new SearchRequest())->setServingConfig($formattedServingConfig);
Currently, (version 0.8.0 of the discovery-engine library) the $formattedServingConfig string that represents the resource against which to search is created using the 'servingConfigName' static function of the SearchServiceClient:
$formattedServingConfig = SearchServiceClient::servingConfigName(
$this->configuration['google_cloud_project_id'],
$this->configuration['google_cloud_location'],
$this->configuration['vertex_ai_data_store_id'],
$this->configuration['vertex_ai_serving_config']
);
The shortcoming of using the 'servingConfigName' function is that it requires the datastore to be specified; all search requests will be performed against that specific datastore resource. This may not always be desired as search apps now support blended search and can use multiple datastores.
With the 1.0.0 version of the google/cloud-discoveryengine library, there are other functions available for creating the $formattedServingConfig string that represents the resource against which to search:
The 'projectLocationCollectionEngineServingConfigName' can be used to specify a specific search app (Engine) to use without having to indicate a specific, single datastore.
Support for all of these options for creating the resource string should be available.
-