Skip to content

Commit 28c2a0f

Browse files
vyavdoshenkoromange
authored andcommitted
chore: lower log level for harmless "Invalid Json path" warnings (#5163)
Fixed: #5125
1 parent a3e1f68 commit 28c2a0f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/search/doc_accessors.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ JsonAccessor::JsonPathContainer* JsonAccessor::GetPath(std::string_view field) c
364364
}
365365

366366
if (!ptr) {
367-
LOG(WARNING) << "Invalid Json path: " << field << ' ' << ec_msg;
367+
// This can occur for fields that are not actual JSON paths but are computed aliases
368+
// (e.g., 'vector_distance' from a KNN search clause in FT.SEARCH RETURN).
369+
// Such fields are valid for return but won't be found as paths in the document.
370+
VLOG(1) << "Invalid Json path: " << field << ' ' << ec_msg;
368371
return nullptr;
369372
}
370373

0 commit comments

Comments
 (0)