Limiting fields for import script
rkeppner opened this issue · comments
When I configure the Firestore extension, I can indicate which fields I want to index in Meilisearch. However, the script to import existing documents (firestore-meilisearch
) doesn't seem to have this option. When I import the existing documents, all fields seem to be indexed.
What's the best way to import existing documents while only indexing certain fields?
I found one way to do it: set the environment variable MEILISEARCH_FIELDS_TO_INDEX
. I'm going to assume this just needs to be added to the documentation and submit a PR for that, as soon as I get around to it.
Hey @rkeppner, the issue seems to be that fieldsToIndex
is not added as a CLI flag here:
firestore-meilisearch/functions/src/import/config.ts
Lines 14 to 20 in 73f0089
While your PR does create a work-around, it should be fixed by adding fieldsToIndex
as a flag.
I opened a PR with the fix.