Skip to content

Conversation

@ginkelsoft-development
Copy link
Owner

No description provided.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Previously, the encryptedExact() and encryptedPrefix() scopes always
queried the database table 'encrypted_search_index', even when
Elasticsearch was enabled. This caused zero results when ES mode
was active, as tokens were written to ES but queries hit the empty
database table.

Changes:
- Added searchElasticsearch() helper method to query ES index
- Updated scopeEncryptedExact() to check ES config and route accordingly
- Updated scopeEncryptedPrefix() to check ES config and route accordingly
- Both scopes now fall back to database when ES is disabled
- Added error handling with logging for ES query failures

This fixes the critical bug where ES integration was non-functional
for search operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ginkelsoft-development ginkelsoft-development force-pushed the fix/elasticsearch-query-scopes branch from 6b80465 to 3406612 Compare October 13, 2025 09:02
@ginkelsoft-development ginkelsoft-development merged commit e4dd2ab into develop Oct 13, 2025
8 checks passed
ginkelsoft-development added a commit that referenced this pull request Oct 14, 2025
…query-scopes

Fix/elasticsearch query scopes
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