Class: Turbopuffer::Models::Limit::Per

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/limit.rb

Overview

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(attributes:, limit:) ⇒ Object

Limits the number of documents with the same value for a set of attributes (the “limit key”) that can appear in the results.

Parameters:

  • attributes (Array<String>)

    The attributes to include in the limit key.

  • limit (Integer)

    The maximum number of documents to return for each value of the limit key.



# File 'lib/turbopuffer/models/limit.rb', line 43

Instance Attribute Details

#attributesArray<String>

The attributes to include in the limit key.

Returns:

  • (Array<String>)


35
# File 'lib/turbopuffer/models/limit.rb', line 35

required :attributes, Turbopuffer::Internal::Type::ArrayOf[String]

#limitInteger

The maximum number of documents to return for each value of the limit key.

Returns:

  • (Integer)


41
# File 'lib/turbopuffer/models/limit.rb', line 41

required :limit, Integer