Skip to content

Conversation

@jruaux
Copy link
Contributor

@jruaux jruaux commented Dec 28, 2025

This PR implements the FT.INFO command to retrieve index information from RediSearch.

The implementation returns a IndexInfo object.

Changes:

  • Add IndexInfo class with index information including:
    • Basic index information (name, document counts, terms, records)
    • Index options and definition
    • Schema attributes
    • Size statistics (memory usage)
    • Indexing statistics (progress, failures, timing)
    • Garbage collection statistics
    • Cursor statistics
    • Dialect usage statistics
    • Error statistics
  • Add IndexInfoParser supporting both RESP2 and RESP3 protocols
  • Implement ftInfo across all API layers (sync, async, reactive, coroutines)
  • Add unit tests for IndexInfo class (11 tests, all passing)
  • Update integration tests

Testing:
All unit tests pass. Integration tests require a Redis instance with RediSearch module.

Implements FT.INFO command to retrieve index information from RediSearch.
Returns a strongly-typed IndexInfo object instead of Map<String, Object>
for better type safety and developer experience.

Changes:
- Add IndexInfo class with comprehensive index metadata
- Add IndexInfoParser supporting RESP2 and RESP3 protocols
- Implement ftInfo across all API layers (sync, async, reactive, coroutines)
- Add unit tests for IndexInfo class
- Update integration tests
@jruaux jruaux changed the title Add FT.INFO command with strongly-typed IndexInfo response Implement FT.INFO command Dec 28, 2025
@jruaux jruaux marked this pull request as draft December 29, 2025 07:48
- Changed IndexInfo from IndexInfo<K, V> to IndexInfo<V>
- Index name is now always String type (decoded with StringCodec)
- Updated all ftInfo method signatures across all command interfaces
- Updated IndexInfoParser to decode index name as String
- Updated all tests to use new signature
- Removed IndexInfoParserUnitTests (integration tests provide better coverage)

All integration tests passing (testFtInfoCommand*)
- Handle case where parseListValue already parsed ComplexData into List
- Add support for String values in parseLong, parseDouble, and parseBoolean methods
- Fix parsing of field flags when SORTABLE has a flag as its value (e.g., SORTABLE NOSTEM)
- Update getBoolean to decode non-String flag values using decodeStringAsString
- Add isFieldFlag helper method to identify known field flags
@jruaux jruaux marked this pull request as ready for review December 29, 2025 21:25
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.

2 participants