struct Qdrant::Hit

Overview

A search result — the stable type exposed to consumers.

The ONLY place that knows the generated types (anti-corruption layer): it parses Qdrant::Api::ScoredPoint. Unwrapping the Response(QueryPoints200Response) (.value.result.points) lives in Collection#search.

#id is an application rowid (Int64). The OpenAPI layer models the point id as Int32 (ExtendedPointId); we widen it to Int64 in the public API — safe as long as ids stay below 2³¹. String ids (UUIDs) aren't in the working set.

Defined in:

qdrant/hit.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from(scored : Qdrant::Api::ScoredPoint) : Hit #

[View source]
def self.new(id : Int64, score : Float32, payload : Hash(String, JSON::Any) = {} of String => JSON::Any) #

[View source]

Instance Method Detail

def id : Int64 #

[View source]
def payload : Hash(String, JSON::Any) #

[View source]
def score : Float32 #

[View source]