Skip to content

Conversation

@bsbodden
Copy link
Collaborator

@bsbodden bsbodden commented Dec 8, 2025

The extractQueryFields method in RediSearchQuery and RedisEnhancedQuery only checked for explicit index annotations (@NumericIndexed, @TagIndexed, etc.) but did not handle @id fields that are automatically indexed by RediSearchIndexer.

This caused findByIdIn queries to return incorrect results (all records or no filtering) when the @id field had no explicit index annotation.

The fix adds handling for @id fields in extractQueryFields():

  • Number types (Long, Integer, etc.) -> NUMERIC field type
  • String, UUID, Ulid, etc. -> TAG field type

This matches the auto-indexing behavior in RediSearchIndexer where @id fields are automatically indexed based on their Java type.

The extractQueryFields method in RediSearchQuery and RedisEnhancedQuery
only checked for explicit index annotations (@NumericIndexed, @TagIndexed,
etc.) but did not handle @id fields that are automatically indexed by
RediSearchIndexer.

This caused findByIdIn queries to return incorrect results (all records
or no filtering) when the @id field had no explicit index annotation.

The fix adds handling for @id fields in extractQueryFields():
- Number types (Long, Integer, etc.) -> NUMERIC field type
- String, UUID, Ulid, etc. -> TAG field type

This matches the auto-indexing behavior in RediSearchIndexer where @id
fields are automatically indexed based on their Java type.
@bsbodden bsbodden self-assigned this Dec 8, 2025
@bsbodden bsbodden merged commit aae38a1 into main Dec 8, 2025
4 checks passed
@bsbodden bsbodden deleted the bsb/issue-699 branch December 8, 2025 05:46
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