refactor!: Refactor Extension for Multi-Collection Support#129
Merged
14 commits merged intotypesense:masterfrom Mar 23, 2026
Merged
refactor!: Refactor Extension for Multi-Collection Support#12914 commits merged intotypesense:masterfrom
14 commits merged intotypesense:masterfrom
Conversation
00d55c4 to
2cd7eb6
Compare
2cd7eb6 to
52088de
Compare
Collaborator
Author
|
Implement #121 |
|
Any updates? |
- implement comma-separated parameter parsing for multiple collections - add pipe-separated field mapping and boolean list parsing - create dynamic collection configuration map with validation - maintain backward compatibility with single collection parameters
…t suite • add createTypesenseDocument function with collection-specific config support • replace separate flattening/non-flattening test files with unified test suite
…d subcollections • refactor indexOnWrite to dynamically generate functions for multiple collections • add handleDocumentIndexing function for centralized document processing • replace old test files with comprehensive multi-collection test suites • support subcollections with context parameter extraction and handling
… subcollections • refactor backfill to process multiple collections with dynamic validation • add backfillCollection function for centralized collection processing • replace old test files with multi-collection test suites • support subcollections with context parameter extraction and field filtering • update logging and error handling for better multi-collection support • fix test configuration to work with new multi-collection setup
0010d7d to
84b3fbf
Compare
84b3fbf to
d7b7607
Compare
d7b7607 to
486a270
Compare
1 task
26d6865
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Features Added
• Multi-Collection Support: Dynamically generate functions for multiple Firestore collections and subcollections
• Collection-Specific Configuration: Individual field filtering, flattening settings, and Typesense collection mapping per Firestore collection
• Subcollection Support: Handle nested collections with path parameters (e.g.,
users/{userId}/books)• Enhanced Field Filtering: Pipe-separated field lists for granular control over indexed data
• Centralized Document Processing: New
createTypesenseDocumentandhandleDocumentIndexingfunctions for consistent document handling• Context Parameter Extraction: Automatically extract and include path placeholders in indexed documents
Configuration Updates
• New Environment Variables:
FIRESTORE_COLLECTION_PATHS,TYPESENSE_COLLECTION_NAMES,FIRESTORE_COLLECTION_FIELDS_LIST,FLATTEN_NESTED_DOCUMENTS_LIST• Enhanced Extension Configuration: Updated
extension.yamlwith multi-collection parameters and validation• Test Environment Configs: Multiple test configuration files for different scenarios
Testing Enhancements
• Update tests to utilize the
TestEnvironmentclass to avoid manual copying of environment files to thefunctionsdirBreaking Changes
• Configuration Format: New multi-collection configuration format replaces single-collection setup
• Environment Variables: Updated parameter names and structure for multi-collection support
• Function Generation: Dynamic function generation replaces static single-function approach
PR Checklist