Skip to content
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

Add the ability to provide a configuration file on CLI launch #29

Open
alallema opened this issue Dec 9, 2021 · 0 comments
Open

Add the ability to provide a configuration file on CLI launch #29

alallema opened this issue Dec 9, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@alallema
Copy link
Contributor

alallema commented Dec 9, 2021

Description
Currently, the firebase extension allows via a script to import the existing documents already present in Firestore before its installation.
To do it, the script proposes two ways to be launched in prompt mode and in command-line mode. It will be nice to add the possibility to launch the script with a configuration file that would contain all variables.

Basic example
File with configuration fields:

LOCATION=us-central1
COLLECTION_PATH=movies
FIELDS_TO_INDEX=
SEARCHABLE_FIELDS=
MEILISEARCH_INDEX_NAME=movies
MEILISEARCH_HOST='http://138.68.183.199'
MEILISEARCH_API_KEY='masterKey'

Command line to launch the script:

npx firestore-meilisearch -f <path_to_file>
npx firestore-meilisearch --file <path_to_file>
@alallema alallema mentioned this issue Dec 9, 2021
6 tasks
@alallema alallema changed the title Add the possibility to launch the script via configuration file Add the ability to launch the script via configuration file Dec 9, 2021
@alallema alallema changed the title Add the ability to launch the script via configuration file Add the ability to launch the import script via configuration file Dec 9, 2021
meili-bors bot added a commit that referenced this issue Mar 17, 2022
28: Add Backfilled data script r=alallema a=alallema

# Pull Request

## What does this PR do?
Add a script to back-filled data from Firestore to MeiliSearch to give the possibility to import existing documents or reindex them if you already have documents in a Firestore Collection when you enable the MeiliSearch extension.
Check [an example from google extension](https://github.com/firebase/extensions/tree/master/firestore-bigquery-export#backfill-your-bigquery-dataset)
#15

## PR checklist
- [x] Handles different possibilities to launch the script
    - [x] Command line with parameter
    - [x] interactively
- [x] Add the possibility to import documents by batch
- [x] Add the possibility to import documents from sub-collections
- [x] Write a guide

**Notes:**
- The ability to run the script with a configuration file is not part of the MVP and may be implemented later #29 

Co-authored-by: alallema <[email protected]>
Co-authored-by: Amélie <[email protected]>
@bidoubiwa bidoubiwa added the enhancement New feature or request label Mar 28, 2022
@bidoubiwa bidoubiwa changed the title Add the ability to launch the import script via configuration file Add the ability to provide a configuration file on CLI launch May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants