firestore-typesense-search icon indicating copy to clipboard operation
firestore-typesense-search copied to clipboard

refactor!: Refactor Extension for Multi-Collection Support

Open tharropoulos opened this issue 6 months ago • 2 comments

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 createTypesenseDocument and handleDocumentIndexing functions 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_LISTEnhanced Extension Configuration: Updated extension.yaml with multi-collection parameters and validation • Test Environment Configs: Multiple test configuration files for different scenarios

Testing Enhancements

• Update tests to utilize the TestEnvironment class to avoid manual copying of environment files to the functions dir

Breaking 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

tharropoulos avatar Sep 04 '25 14:09 tharropoulos

Implement #121

tharropoulos avatar Sep 04 '25 14:09 tharropoulos

Any updates?

elhe26 avatar Nov 05 '25 19:11 elhe26