Class: Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::CrowdingSpec

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb

Overview

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.

Defined Under Namespace

Modules: Mode

Instance Attribute Summary collapse

Instance Attribute Details

#field::String

Returns The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.

Returns:

  • (::String)

    The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.



1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1336

class CrowdingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing the mode to use for documents that are crowded away.
  # They can be dropped or demoted to the later pages.
  module Mode
    # Unspecified crowding mode. In this case, server behavior defaults to
    # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::CrowdingSpec::Mode::DROP_CROWDED_RESULTS Mode.DROP_CROWDED_RESULTS}.
    MODE_UNSPECIFIED = 0

    # Drop crowded results.
    DROP_CROWDED_RESULTS = 1

    # Demote crowded results to the later pages.
    DEMOTE_CROWDED_RESULTS_TO_END = 2
  end
end

#max_count::Integer

Returns 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.

Returns:

  • (::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.



1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1336

class CrowdingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing the mode to use for documents that are crowded away.
  # They can be dropped or demoted to the later pages.
  module Mode
    # Unspecified crowding mode. In this case, server behavior defaults to
    # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::CrowdingSpec::Mode::DROP_CROWDED_RESULTS Mode.DROP_CROWDED_RESULTS}.
    MODE_UNSPECIFIED = 0

    # Drop crowded results.
    DROP_CROWDED_RESULTS = 1

    # Demote crowded results to the later pages.
    DEMOTE_CROWDED_RESULTS_TO_END = 2
  end
end

#mode::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::CrowdingSpec::Mode

Returns Mode to use for documents that are crowded away.

Returns:



1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1336

class CrowdingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing the mode to use for documents that are crowded away.
  # They can be dropped or demoted to the later pages.
  module Mode
    # Unspecified crowding mode. In this case, server behavior defaults to
    # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::CrowdingSpec::Mode::DROP_CROWDED_RESULTS Mode.DROP_CROWDED_RESULTS}.
    MODE_UNSPECIFIED = 0

    # Drop crowded results.
    DROP_CROWDED_RESULTS = 1

    # Demote crowded results to the later pages.
    DEMOTE_CROWDED_RESULTS_TO_END = 2
  end
end