Skip to content

Commit

Permalink
fix: conflicts on new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ja7ad committed Aug 1, 2024
1 parent 1a59b95 commit 52de46a
Show file tree
Hide file tree
Showing 2 changed files with 913 additions and 510 deletions.
17 changes: 17 additions & 0 deletions index_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,20 @@ func (i Index) Search(query string, request *SearchRequest) (*SearchResponse, er

return resp, nil
}

func (i Index) SearchSimilarDocuments(param *SimilarDocumentQuery, resp *SimilarDocumentResult) error {
req := internalRequest{
endpoint: "/indexes/" + i.UID + "/similar",
method: http.MethodPost,
withRequest: param,
withResponse: resp,
acceptedStatusCodes: []int{http.StatusOK},
functionName: "SearchSimilarDocuments",
contentType: contentTypeJSON,
}

if err := i.client.executeRequest(req); err != nil {
return err
}
return nil
}
Loading

0 comments on commit 52de46a

Please sign in to comment.