Add some log to print size of search result (#27601)

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
pull/27491/head
smellthemoon 2023-10-16 10:48:08 +08:00 committed by GitHub
parent e386a62fae
commit 5785756d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -124,6 +124,8 @@ ReduceHelper::FillPrimaryKey() {
uint32_t valid_index = 0;
for (auto& search_result : search_results_) {
FilterInvalidSearchResult(search_result);
LOG_SEGCORE_DEBUG_ << "the size of search result"
<< search_result->seg_offsets_.size();
if (search_result->get_total_result_count() > 0) {
auto segment =
static_cast<SegmentInterface*>(search_result->segment_);

View File

@ -796,10 +796,12 @@ func reduceSearchResultData(ctx context.Context, subSearchResultData []*schemapb
}
for i, sData := range subSearchResultData {
pkLength := typeutil.GetSizeOfIDs(sData.GetIds())
log.Ctx(ctx).Debug("subSearchResultData",
zap.Int("result No.", i),
zap.Int64("nq", sData.NumQueries),
zap.Int64("topk", sData.TopK),
zap.Int("length of pks", pkLength),
zap.Any("length of FieldsData", len(sData.FieldsData)))
if err := checkSearchResultData(sData, nq, topk); err != nil {
log.Ctx(ctx).Warn("invalid search results", zap.Error(err))