Skip to content

Commit 1cfcb15

Browse files
committed
Fix error when parsing response from Search with NOCONTENT flag
1 parent 86ae611 commit 1cfcb15

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
- Summarize Search option enabled by default (without possibility to disable it) ([Issue#26])
1212
- Highlight Search option enabled by default (without possibility to disable it) ([Issue#26])
13+
- Fix error when parsing response from Search with NOCONTENT flag
1314

1415
## [2.1.0]
1516

src/Redis/Command/Search.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ public function parseResponse($data)
327327
$chunkSize = 2 // Hash + fields
328328
+ (true === $useScores ? 1 : 0)
329329
+ (true === $usePayloads ? 1 : 0)
330-
+ (true === $useSortKeys ? 1 : 0);
330+
+ (true === $useSortKeys ? 1 : 0)
331+
- (true === $noContent ? 1 : 0)
332+
;
331333

332334
$documents = array_chunk($data, $chunkSize);
333335

0 commit comments

Comments
 (0)