Versions in this module Expand all Collapse all v1 v1.2.10 Jan 7, 2025 Changes in this version + var Info embed.FS + func NewErrLogger() elastic.Logger + type AnswerPostDoc struct + Active int64 + Answers int64 + Content string + Created int64 + HasAccepted bool + Id string + ObjectID string + QuestionID string + Score int64 + Status int64 + Tags []string + Title string + Type string + UserID string + Views int64 + func CreateDocFromSearchContent(id string, content *plugin.SearchContent) (doc *AnswerPostDoc) + type ErrLogger struct + func (l ErrLogger) Printf(format string, v ...interface{}) + type LoggingHttpClient struct + func (l LoggingHttpClient) Do(r *http.Request) (*http.Response, error) + type Operator struct + C *elastic.Client + func NewOperator(urls []string, username, password string) (c *Operator, err error) + func (op *Operator) CreateIndex(ctx context.Context, indexName string, mapping string) (err error) + func (op *Operator) DeleteDoc(ctx context.Context, indexName string, id string) (err error) + func (op *Operator) QueryDoc(ctx context.Context, indexName string, query elastic.Query, ...) (result *elastic.SearchResult, err error) + func (op *Operator) SaveDoc(ctx context.Context, indexName string, id string, doc interface{}) (err error) + type SearchContent struct + Active int64 + Answers int64 + Content string + Created int64 + HasAccepted bool + ObjectID string + QuestionID string + Score int64 + Status int64 + Tags []string + Title string + Type string + UserID string + Views int64 + type SearchEngine struct + Config *SearchEngineConfig + Operator *Operator + func (s *SearchEngine) ConfigFields() []plugin.ConfigField + func (s *SearchEngine) ConfigReceiver(config []byte) error + func (s *SearchEngine) DeleteContent(ctx context.Context, contentID string) error + func (s *SearchEngine) Description() plugin.SearchDesc + func (s *SearchEngine) Info() plugin.Info + func (s *SearchEngine) RegisterSyncer(ctx context.Context, syncer plugin.SearchSyncer) + func (s *SearchEngine) SearchAnswers(ctx context.Context, cond *plugin.SearchBasicCond) (res []plugin.SearchResult, total int64, err error) + func (s *SearchEngine) SearchContents(ctx context.Context, cond *plugin.SearchBasicCond) (res []plugin.SearchResult, total int64, err error) + func (s *SearchEngine) SearchQuestions(ctx context.Context, cond *plugin.SearchBasicCond) (res []plugin.SearchResult, total int64, err error) + func (s *SearchEngine) UpdateContent(ctx context.Context, content *plugin.SearchContent) error + type SearchEngineConfig struct + Endpoints string + Password string + Username string