Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Field.
A schema field to be used for Search As You Type scoring on this request. Overrides any data-store-level Search As You Type field configuration for the duration of the request.
Generated from protobuf message google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Field
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ SearchRequest \ SearchAsYouTypeSpecMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ key |
string
Required. A field key that has been indexed for Search As You Type. |
↳ weight |
float
Optional. Weight for scores from this field. Defaults to 1.0 if not specified. |
getKey
Required. A field key that has been indexed for Search As You Type.
| Returns | |
|---|---|
| Type | Description |
string |
|
setKey
Required. A field key that has been indexed for Search As You Type.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getWeight
Optional. Weight for scores from this field. Defaults to 1.0 if not specified.
| Returns | |
|---|---|
| Type | Description |
float |
|
hasWeight
clearWeight
setWeight
Optional. Weight for scores from this field. Defaults to 1.0 if not specified.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|