-
Notifications
You must be signed in to change notification settings - Fork 37
refactor!: Refactor Extension for Multi-Collection Support #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tharropoulos
wants to merge
11
commits into
typesense:master
Choose a base branch
from
tharropoulos:1-n-collections
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
00d55c4 to
2cd7eb6
Compare
- 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
2cd7eb6 to
52088de
Compare
Collaborator
Author
|
Implement #121 |
|
Any updates? |
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