Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SearchAsYouTypeSpec.
Specification for search as you type in search requests.
Generated from protobuf message google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ SearchRequestMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ condition |
int
The condition under which search as you type should occur. Default to Condition.DISABLED. |
↳ fields |
array<SearchAsYouTypeSpec\Field>
Optional. The list of fields to be used for Search As You Type scoring. |
↳ score_threshold |
float
Optional. Search As You Type score threshold for filtering purpose. We keep the result if |
getCondition
The condition under which search as you type should occur.
Default to Condition.DISABLED.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type Condition. |
setCondition
The condition under which search as you type should occur.
Default to Condition.DISABLED.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type Condition. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFields
Optional. The list of fields to be used for Search As You Type scoring.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<SearchAsYouTypeSpec\Field> |
|
setFields
Optional. The list of fields to be used for Search As You Type scoring.
| Parameter | |
|---|---|
| Name | Description |
var |
array<SearchAsYouTypeSpec\Field>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getScoreThreshold
Optional. Search As You Type score threshold for filtering purpose.
We keep the result if score >= score_threshold.
| Returns | |
|---|---|
| Type | Description |
float |
|
hasScoreThreshold
clearScoreThreshold
setScoreThreshold
Optional. Search As You Type score threshold for filtering purpose.
We keep the result if score >= score_threshold.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|