Skip to content

Conversation

@mgravell
Copy link
Collaborator

@mgravell mgravell commented Feb 5, 2026

fix #448

  • do not assume results array is non-empty
  • simplify and verify score/content/payload permutations

The biggest "fix" is the second one; in the existing code, a mismatch in the setup code (that calculates the elements-per-row) and the actual reading code meant that the "with payloads, without content" scenario applied different logic in the two places (nested if in the init, but independent if in the parser), with unpredictable results. This has been simplified.

 - do not assume results array is non-empty
 - simplify and verify score/content/payload permutations
@mgravell mgravell changed the title defensive code in parsing FT.SEARCH results: defensive code when parsing FT.SEARCH results Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible bug: SearchCommands.SearchAsync() occasionally throws an IndexOutOfRange exception

1 participant