Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

refactor: streamline plugin initialization by removing redundant search syncer registration

hgaole3831b6f525a
diff --git a/internal/service/plugin_common/plugin_common_service.go b/internal/service/plugin_common/plugin_common_service.go
index b3674a23..2c1a72fd 100644
--- a/internal/service/plugin_common/plugin_common_service.go
+++ b/internal/service/plugin_common/plugin_common_service.go
@@ -183,11 +183,7 @@ func (ps *PluginCommonService) initPluginData() {
})
}
- // register syncers for search and vector search plugins on startup
- _ = plugin.CallSearch(func(search plugin.Search) error {
- search.RegisterSyncer(context.Background(), search_sync.NewPluginSyncer(ps.data))
- return nil
- })
+ // register syncer for vector search plugins on startup
_ = plugin.CallVectorSearch(func(vs plugin.VectorSearch) error {
vs.RegisterSyncer(context.Background(), vector_search_sync.NewPluginSyncer(ps.data))
return nil