class
Qdrant::Api::HnswConfig
- Qdrant::Api::HnswConfig
- Reference
- Object
Overview
Config of HNSW index
Included Modules
- JSON::Serializable
- Qdrant::Api::Serializable
- Qdrant::Api::Validation
- YAML::Serializable
Defined in:
qdrant-api/models/hnsw_config.crConstructors
-
.new(m : Int32, ef_construct : Int32, full_scan_threshold : Int32, max_indexing_threads : Int32 | Nil = 0, on_disk : Bool | Nil = nil, payload_m : Int32 | Nil = nil, inline_storage : Bool | Nil = nil)
Initializes the object @param [Hash] attributes Model attributes in the form of hash
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Instance Method Summary
-
#==(other : self)
Returns
trueif this reference is the same as other. -
#ef_construct : Int32
Number of neighbours to consider during the index building.
-
#ef_construct=(value : Int32)
Number of neighbours to consider during the index building.
- #ef_construct_validation_error(value) : String | Nil
-
#full_scan_threshold : Int32
Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search.
-
#full_scan_threshold=(value : Int32)
Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search.
- #full_scan_threshold_validation_error(value) : String | Nil
-
#hash(hasher)
See
Object#hash(hasher) -
#inline_storage : Bool | Nil
Store copies of original and quantized vectors within the HNSW index file.
-
#inline_storage=(inline_storage : Bool | Nil)
Store copies of original and quantized vectors within the HNSW index file.
-
#list_invalid_properties
Show invalid properties with the reasons.
-
#m : Int32
Required properties Number of edges per node in the index graph.
-
#m=(value : Int32)
Required properties Number of edges per node in the index graph.
- #m_validation_error(value) : String | Nil
-
#max_indexing_threads : Int32 | Nil
Optional properties Number of parallel threads used for background index building.
-
#max_indexing_threads=(value : Int32 | Nil)
Optional properties Number of parallel threads used for background index building.
- #max_indexing_threads_validation_error(value) : String | Nil
-
#on_disk : Bool | Nil
Store HNSW index on disk.
-
#on_disk=(on_disk : Bool | Nil)
Store HNSW index on disk.
-
#payload_m : Int32 | Nil
Custom M param for hnsw graph built for payload index.
-
#payload_m=(value : Int32 | Nil)
Custom M param for hnsw graph built for payload index.
- #payload_m_validation_error(value) : String | Nil
-
#valid?
Check to see if the all the properties in the model are valid @return true if the model is valid
Macros inherited from module Qdrant::Api::Validation
validates(name, klass, nilable, **rules)
validates
Instance methods inherited from module Qdrant::Api::Serializable
eql?(other)
eql?,
to_body : Hash(String, JSON::Any)
to_body,
to_h : Hash(String, JSON::Any)
to_h,
to_s(io : IO) : Nil
to_s
Constructor Detail
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Returns true if this reference is the same as other. Invokes same?.
Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.
Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.
Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search. This measures the total size of vectors being queried against. When the maximum estimated amount of points that a condition satisfies is smaller than full_scan_threshold_kb, the query planner will use full-scan search instead of HNSW index traversal for better performance. Note: 1Kb = 1 vector of size 256
Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search. This measures the total size of vectors being queried against. When the maximum estimated amount of points that a condition satisfies is smaller than full_scan_threshold_kb, the query planner will use full-scan search instead of HNSW index traversal for better performance. Note: 1Kb = 1 vector of size 256
Store copies of original and quantized vectors within the HNSW index file. Default: false. Enabling this option will trade the search speed for disk usage by reducing amount of random seeks during the search. Requires quantized vectors to be enabled. Multi-vectors are not supported.
Store copies of original and quantized vectors within the HNSW index file. Default: false. Enabling this option will trade the search speed for disk usage by reducing amount of random seeks during the search. Requires quantized vectors to be enabled. Multi-vectors are not supported.
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Required properties Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.
Required properties Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.
Optional properties Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.
Optional properties Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.
Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false
Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false
Custom M param for hnsw graph built for payload index. If not set, default M will be used.
Custom M param for hnsw graph built for payload index. If not set, default M will be used.
Check to see if the all the properties in the model are valid @return true if the model is valid