Skip to content

Commit 214d898

Browse files
authored
feat: NewQueryDocument helper (#96)
Signed-off-by: Anush008 <[email protected]>
1 parent 431c780 commit 214d898

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

qdrant/oneof_factory.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,11 @@ func NewQueryID(id *PointId) *Query {
710710
return NewQueryNearest(NewVectorInputID(id))
711711
}
712712

713+
// Creates a *Query instance for a nearest query from a *Document input.
714+
func NewQueryDocument(document *Document) *Query {
715+
return NewQueryNearest(NewVectorInputDocument(document))
716+
}
717+
713718
// Creates a *Query instance for recommend query from *RecommendInput.
714719
func NewQueryRecommend(recommend *RecommendInput) *Query {
715720
return &Query{

0 commit comments

Comments
 (0)