Documentation
¶
Overview ¶
Package qmd provides a client for QMD semantic search.
Index ¶
- Variables
- type Client
- func (c *Client) ClearCache()
- func (c *Client) FindRelatedTasks(ctx context.Context, query string, count int) ([]RelatedTask, error)
- func (c *Client) IsAvailable() bool
- func (c *Client) Query(ctx context.Context, query string, collection string, count int) ([]SearchResult, error)
- func (c *Client) Search(ctx context.Context, query string, collection string, count int) ([]SearchResult, error)
- func (c *Client) VSearch(ctx context.Context, query string, collection string, count int) ([]SearchResult, error)
- type RelatedTask
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = NewClient("")
DefaultClient is the global QMD client instance.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the QMD CLI for semantic search.
func (*Client) ClearCache ¶
func (c *Client) ClearCache()
ClearCache clears the search result cache.
func (*Client) FindRelatedTasks ¶
func (c *Client) FindRelatedTasks(ctx context.Context, query string, count int) ([]RelatedTask, error)
FindRelatedTasks searches for tasks related to the given query. It parses task IDs from the document paths (expecting format: task-{id}.md)
func (*Client) IsAvailable ¶
IsAvailable returns true if QMD is installed and usable. Lazily checks on first call.
func (*Client) Query ¶
func (c *Client) Query(ctx context.Context, query string, collection string, count int) ([]SearchResult, error)
Query performs a hybrid search with re-ranking (best quality).
type RelatedTask ¶
RelatedTask represents a related task found via semantic search.
Click to show internal directories.
Click to hide internal directories.