Skip to content

Commit 89d5dd8

Browse files
committed
fix(query): load all fields by default in FT.HYBRID post-processing
When no specific return fields are configured, call loadAll() so that document content is included in the FT.HYBRID response. Without this, queries return matched document keys but with empty field values.
1 parent eceece3 commit 89d5dd8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/src/main/java/com/redis/vl/query/HybridQuery.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,12 @@ public FTHybridParams buildFTHybridParams() {
294294
// Build COMBINE clause
295295
Combiner combiner = buildCombiner();
296296

297-
// Build POST-PROCESSING clause
297+
// Build POST-PROCESSING clause — LOAD fields so document content is returned in the response
298298
FTHybridPostProcessingParams.Builder postBuilder = FTHybridPostProcessingParams.builder();
299299
if (!returnFields.isEmpty()) {
300300
postBuilder.load(returnFields.toArray(new String[0]));
301+
} else {
302+
postBuilder.loadAll();
301303
}
302304
postBuilder.limit(Limit.of(0, numResults));
303305

0 commit comments

Comments
 (0)