Google Cloud Retail V2 Client - Class RerankConfig (1.7.0)

Reference documentation and code samples for the Google Cloud Retail V2 Client class RerankConfig.

Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable.

To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).

Generated from protobuf message google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig

Namespace

Google \ Cloud \ Retail \ V2 \ CatalogAttribute \ FacetConfig

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ rerank_facet bool

If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.

↳ facet_values array

If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.

getRerankFacet

If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.

Returns
Type Description
bool

setRerankFacet

If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.

Parameter
Name Description
var bool
Returns
Type Description
$this

getFacetValues

If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setFacetValues

If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.

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