Retail V2 API - Class Google::Cloud::Retail::V2::Rule (v1.3.0)

Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::Rule.

A rule is a condition-action pair

  • A condition defines when a rule is to be triggered.
  • An action specifies what occurs on that trigger. Currently rules only work for controls with SOLUTION_TYPE_SEARCH.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#boost_action

def boost_action() -> ::Google::Cloud::Retail::V2::Rule::BoostAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.

    Note: The following fields are mutually exclusive: boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#boost_action=

def boost_action=(value) -> ::Google::Cloud::Retail::V2::Rule::BoostAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.

    Note: The following fields are mutually exclusive: boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::BoostAction) — A boost action.

    Note: The following fields are mutually exclusive: boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#condition

def condition() -> ::Google::Cloud::Retail::V2::Condition
Returns

#condition=

def condition=(value) -> ::Google::Cloud::Retail::V2::Condition
Parameter
Returns

#do_not_associate_action

def do_not_associate_action() -> ::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.

    Note: The following fields are mutually exclusive: do_not_associate_action, boost_action, redirect_action, oneway_synonyms_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#do_not_associate_action=

def do_not_associate_action=(value) -> ::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.

    Note: The following fields are mutually exclusive: do_not_associate_action, boost_action, redirect_action, oneway_synonyms_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction) — Prevents term from being associated with other terms.

    Note: The following fields are mutually exclusive: do_not_associate_action, boost_action, redirect_action, oneway_synonyms_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#filter_action

def filter_action() -> ::Google::Cloud::Retail::V2::Rule::FilterAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.

    Note: The following fields are mutually exclusive: filter_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#filter_action=

def filter_action=(value) -> ::Google::Cloud::Retail::V2::Rule::FilterAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.

    Note: The following fields are mutually exclusive: filter_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::FilterAction) — Filters results.

    Note: The following fields are mutually exclusive: filter_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#force_return_facet_action

def force_return_facet_action() -> ::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.

    Note: The following fields are mutually exclusive: force_return_facet_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#force_return_facet_action=

def force_return_facet_action=(value) -> ::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.

    Note: The following fields are mutually exclusive: force_return_facet_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction) — Force returns an attribute as a facet in the request.

    Note: The following fields are mutually exclusive: force_return_facet_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#ignore_action

def ignore_action() -> ::Google::Cloud::Retail::V2::Rule::IgnoreAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.

    Note: The following fields are mutually exclusive: ignore_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#ignore_action=

def ignore_action=(value) -> ::Google::Cloud::Retail::V2::Rule::IgnoreAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.

    Note: The following fields are mutually exclusive: ignore_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::IgnoreAction) — Ignores specific terms from query during search.

    Note: The following fields are mutually exclusive: ignore_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#oneway_synonyms_action

def oneway_synonyms_action() -> ::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction) — Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.

    Note: The following fields are mutually exclusive: oneway_synonyms_action, boost_action, redirect_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#oneway_synonyms_action=

def oneway_synonyms_action=(value) -> ::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction) — Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.

    Note: The following fields are mutually exclusive: oneway_synonyms_action, boost_action, redirect_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction) — Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.

    Note: The following fields are mutually exclusive: oneway_synonyms_action, boost_action, redirect_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#redirect_action

def redirect_action() -> ::Google::Cloud::Retail::V2::Rule::RedirectAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.

    Note: The following fields are mutually exclusive: redirect_action, boost_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#redirect_action=

def redirect_action=(value) -> ::Google::Cloud::Retail::V2::Rule::RedirectAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.

    Note: The following fields are mutually exclusive: redirect_action, boost_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::RedirectAction) — Redirects a shopper to a specific page.

    Note: The following fields are mutually exclusive: redirect_action, boost_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#remove_facet_action

def remove_facet_action() -> ::Google::Cloud::Retail::V2::Rule::RemoveFacetAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).

    Note: The following fields are mutually exclusive: remove_facet_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#remove_facet_action=

def remove_facet_action=(value) -> ::Google::Cloud::Retail::V2::Rule::RemoveFacetAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).

    Note: The following fields are mutually exclusive: remove_facet_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::RemoveFacetAction) — Remove an attribute as a facet in the request (if present).

    Note: The following fields are mutually exclusive: remove_facet_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#replacement_action

def replacement_action() -> ::Google::Cloud::Retail::V2::Rule::ReplacementAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.

    Note: The following fields are mutually exclusive: replacement_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#replacement_action=

def replacement_action=(value) -> ::Google::Cloud::Retail::V2::Rule::ReplacementAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.

    Note: The following fields are mutually exclusive: replacement_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::ReplacementAction) — Replaces specific terms in the query.

    Note: The following fields are mutually exclusive: replacement_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, ignore_action, filter_action, twoway_synonyms_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#twoway_synonyms_action

def twoway_synonyms_action() -> ::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction
Returns
  • (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.

    Note: The following fields are mutually exclusive: twoway_synonyms_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

#twoway_synonyms_action=

def twoway_synonyms_action=(value) -> ::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction
Parameter
  • value (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.

    Note: The following fields are mutually exclusive: twoway_synonyms_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction) — Treats a set of terms as synonyms of one another.

    Note: The following fields are mutually exclusive: twoway_synonyms_action, boost_action, redirect_action, oneway_synonyms_action, do_not_associate_action, replacement_action, ignore_action, filter_action, force_return_facet_action, remove_facet_action. If a field in that set is populated, all other fields in the set will automatically be cleared.