合并路由

This commit is contained in:
2026-04-08 20:12:23 +08:00
parent d14c9caa56
commit 8520b104eb
5 changed files with 378 additions and 522 deletions
+5 -9
View File
@@ -34,7 +34,8 @@ const (
LanguageWeight = 0.5 // 语种匹配权重:与查询语种一致时加分
ConsecutiveKeyWeight = 1.3 // 连续关键词命中权重:多词连续出现时加分
BacklinkWeight = 1.0 // 反向链接权重:指向该 URL 的链接越多得分越高
SearchServerPort = 80 // 搜索服务 HTTP 监听端口
SearchServerPort = 80 // 搜索服务和收获服务的统一 HTTP 监听端口
FlushIntervalSeconds = 60 // 定期刷盘间隔(秒):将内存索引批量写入磁盘
)
// Backlink computation
@@ -50,12 +51,7 @@ const StoragePath = "./savedata"
// Prometheus ports
// 各模块 Prometheus 监控指标的 HTTP 端口
const (
PromPortCrawler = 14950 // 爬虫模块的 metrics 端口
PromPortHarvester = 14951 // 收获服务器模块的 metrics 端口
PromPortBacklink = 14952 // 反向链接计算模块的 metrics 端口
PromPortSearch = 14953 // 搜索服务模块的 metrics 端口
PromPortCrawler = 14950 // 爬虫模块的 metrics 端口
PromPortBacklink = 14952 // 反向链接计算模块的 metrics 端口
PromPortSearch = 14953 // 搜索服务(含收获功能)模块的 metrics 端口
)
// Harvester HTTP endpoint
// 爬虫向收获服务器发送索引数据的 HTTP 端点地址
const HarvesterAddr = "http://127.0.0.1:5000"