想看看每个 shards 返回的时间,来方便设置 HttpShardHandlerFactory。
使用参数
可以使用 shards.info
参数来查看每个 shard 的响应信息。
参数详解
当在查询中添加 shards.info=true
参数时,Solr 会在响应中返回每个 shard 的详细信息,包括:
- 响应时间
- 处理的文档数量
- 查询执行状态
配置示例
1 | http://localhost:8983/solr/collection1/select?q=*:*&shards.info=true |
响应格式
返回的响应中会包含类似以下的信息:
1 | <lst name="shards.info"> |
通过这些信息可以分析各个 shard 的性能表现,进而优化 HttpShardHandlerFactory 的配置。