Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec.
Specification for crowding. Crowding improves the diversity of search results by limiting the number of results that share the same field value. For example, crowding on the color field with a max_count of 3 and mode DROP_CROWDED_RESULTS will return at most 3 results with the same color across all pages.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#field
def field() -> ::String- (::String) — The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.
#field=
def field=(value) -> ::String- value (::String) — The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.
- (::String) — The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.
#max_count
def max_count() -> ::Integer-
(::Integer) — The maximum number of documents to keep per value of the field. Once
there are at least max_count previous results which contain the same
value for the given field (according to the order specified in
order_by), later results with the same value are "crowded away". If not specified, the default value is 1.
#max_count=
def max_count=(value) -> ::Integer-
value (::Integer) — The maximum number of documents to keep per value of the field. Once
there are at least max_count previous results which contain the same
value for the given field (according to the order specified in
order_by), later results with the same value are "crowded away". If not specified, the default value is 1.
-
(::Integer) — The maximum number of documents to keep per value of the field. Once
there are at least max_count previous results which contain the same
value for the given field (according to the order specified in
order_by), later results with the same value are "crowded away". If not specified, the default value is 1.
#mode
def mode() -> ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode- (::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode) — Mode to use for documents that are crowded away.
#mode=
def mode=(value) -> ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode- value (::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode) — Mode to use for documents that are crowded away.
- (::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode) — Mode to use for documents that are crowded away.