Documentation
¶
Index ¶
- type BleveIndex
- func (b *BleveIndex) BatchIndex(tools []*config.ToolMetadata) error
- func (b *BleveIndex) Close() error
- func (b *BleveIndex) DeleteServerTools(serverName string) error
- func (b *BleveIndex) DeleteTool(serverName, toolName string) error
- func (b *BleveIndex) GetDocumentCount() (uint64, error)
- func (b *BleveIndex) GetToolsByServer(serverName string) ([]*config.ToolMetadata, error)
- func (b *BleveIndex) IndexTool(toolMeta *config.ToolMetadata) error
- func (b *BleveIndex) RebuildIndex() error
- func (b *BleveIndex) SearchTools(queryStr string, limit int) ([]*config.SearchResult, error)
- type Manager
- func (m *Manager) BatchIndexTools(tools []*config.ToolMetadata) error
- func (m *Manager) Close() error
- func (m *Manager) DeleteServerTools(serverName string) error
- func (m *Manager) DeleteTool(serverName, toolName string) error
- func (m *Manager) GetDocumentCount() (uint64, error)
- func (m *Manager) GetStats() (map[string]interface{}, error)
- func (m *Manager) GetToolsByServer(serverName string) ([]*config.ToolMetadata, error)
- func (m *Manager) IndexTool(toolMeta *config.ToolMetadata) error
- func (m *Manager) RebuildIndex() error
- func (m *Manager) Search(query string, limit int) ([]*config.SearchResult, error)
- func (m *Manager) SearchTools(query string, limit int) ([]*config.SearchResult, error)
- type ToolDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BleveIndex ¶
type BleveIndex struct {
// contains filtered or unexported fields
}
BleveIndex wraps Bleve index operations
func NewBleveIndex ¶
func NewBleveIndex(dataDir string, logger *zap.Logger) (*BleveIndex, error)
NewBleveIndex creates a new Bleve index
func (*BleveIndex) BatchIndex ¶
func (b *BleveIndex) BatchIndex(tools []*config.ToolMetadata) error
BatchIndex indexes multiple tools in a single batch
func (*BleveIndex) DeleteServerTools ¶
func (b *BleveIndex) DeleteServerTools(serverName string) error
DeleteServerTools removes all tools from a specific server
func (*BleveIndex) DeleteTool ¶
func (b *BleveIndex) DeleteTool(serverName, toolName string) error
DeleteTool removes a tool from the index
func (*BleveIndex) GetDocumentCount ¶
func (b *BleveIndex) GetDocumentCount() (uint64, error)
GetDocumentCount returns the number of documents in the index
func (*BleveIndex) GetToolsByServer ¶
func (b *BleveIndex) GetToolsByServer(serverName string) ([]*config.ToolMetadata, error)
GetToolsByServer retrieves all tools from a specific server
func (*BleveIndex) IndexTool ¶
func (b *BleveIndex) IndexTool(toolMeta *config.ToolMetadata) error
IndexTool indexes a tool document
func (*BleveIndex) RebuildIndex ¶
func (b *BleveIndex) RebuildIndex() error
RebuildIndex rebuilds the entire index
func (*BleveIndex) SearchTools ¶
func (b *BleveIndex) SearchTools(queryStr string, limit int) ([]*config.SearchResult, error)
SearchTools searches for tools using multiple query strategies for better results
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides a unified interface for indexing operations
func NewManager ¶
NewManager creates a new index manager
func (*Manager) BatchIndexTools ¶
func (m *Manager) BatchIndexTools(tools []*config.ToolMetadata) error
BatchIndexTools indexes multiple tools efficiently
func (*Manager) DeleteServerTools ¶
DeleteServerTools removes all tools from a specific server
func (*Manager) DeleteTool ¶
DeleteTool removes a tool from the index
func (*Manager) GetDocumentCount ¶
GetDocumentCount returns the number of indexed documents
func (*Manager) GetToolsByServer ¶
func (m *Manager) GetToolsByServer(serverName string) ([]*config.ToolMetadata, error)
GetToolsByServer retrieves all tools from a specific server
func (*Manager) IndexTool ¶
func (m *Manager) IndexTool(toolMeta *config.ToolMetadata) error
IndexTool indexes a single tool
func (*Manager) RebuildIndex ¶
RebuildIndex rebuilds the entire index
func (*Manager) SearchTools ¶
SearchTools searches for tools matching the query
type ToolDocument ¶
type ToolDocument struct {
ToolName string `json:"tool_name"` // Just the tool name (without server prefix)
FullToolName string `json:"full_tool_name"` // Complete server:tool format
ServerName string `json:"server_name"`
Description string `json:"description"`
ParamsJSON string `json:"params_json"`
Hash string `json:"hash"`
Tags string `json:"tags"`
SearchableText string `json:"searchable_text"` // Combined searchable content
}
ToolDocument represents a tool document in the index