Google Cloud Discovery Engine V1 Client - Class QuerySuggestion (1.17.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class QuerySuggestion.

Suggestions as search queries.

Generated from protobuf message google.cloud.discoveryengine.v1.AdvancedCompleteQueryResponse.QuerySuggestion

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ AdvancedCompleteQueryResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ suggestion string

The suggestion for the query.

↳ completable_field_paths string[]

The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.

↳ data_store string[]

The name of the dataStore that this suggestion belongs to.

↳ score float

The score of each suggestion. The score is in the range of [0, 1].

getSuggestion

The suggestion for the query.

Returns
Type Description
string

setSuggestion

The suggestion for the query.

Parameter
Name Description
var string
Returns
Type Description
$this

getCompletableFieldPaths

The unique document field paths that serve as the source of this suggestion if it was generated from completable fields.

This field is only populated for the document-completable model.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setCompletableFieldPaths

The unique document field paths that serve as the source of this suggestion if it was generated from completable fields.

This field is only populated for the document-completable model.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getDataStore

The name of the dataStore that this suggestion belongs to.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setDataStore

The name of the dataStore that this suggestion belongs to.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getScore

The score of each suggestion. The score is in the range of [0, 1].

Returns
Type Description
float

setScore

The score of each suggestion. The score is in the range of [0, 1].

Parameter
Name Description
var float
Returns
Type Description
$this