Documentation ¶
Index ¶
- func Cosine[T Float](a []T, b []T) T
- func GetMetaID(m map[string]any) (string, bool)
- func PutMetaID(m *map[string]any, id string)
- type DB
- type Doc
- func (*Doc) Descriptor() ([]byte, []int)
- func (m *Doc) GetContent() string
- func (m *Doc) GetId() string
- func (m *Doc) GetMeta() []byte
- func (m *Doc) GetVector() []float32
- func (*Doc) ProtoMessage()
- func (m *Doc) Reset()
- func (m *Doc) String() string
- func (m *Doc) XXX_DiscardUnknown()
- func (m *Doc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Doc) XXX_Merge(src proto.Message)
- func (m *Doc) XXX_Size() int
- func (m *Doc) XXX_Unmarshal(b []byte) error
- type DocWithScore
- type Float
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Doc ¶
type Doc struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Vector []float32 `protobuf:"fixed32,3,rep,packed,name=vector,proto3" json:"vector,omitempty"` Meta []byte `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Doc
func (*Doc) Descriptor ¶
func (*Doc) GetContent ¶
func (*Doc) ProtoMessage ¶
func (*Doc) ProtoMessage()
func (*Doc) XXX_DiscardUnknown ¶
func (m *Doc) XXX_DiscardUnknown()
func (*Doc) XXX_Unmarshal ¶
type DocWithScore ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (Store) AddDocuments ¶
Click to show internal directories.
Click to hide internal directories.