I am trying to integrate Elastic Search into a Flutter app. I have set up the connection successfully however I have a lot of existing data that I need to import to Elastic Search. Google's documentations tells me to add the following environment variables:
GOOGLE_APPLICATION_CREDENTIALS= /path/to/your/serviceAccountKey.json \
COLLECTION_PATH=bookings \
INDEXED_FIELDS=bookingReference, productName, customerSurname, vehicleRegistration \
ENTERPRISE_SEARCH_URL=https://898c1e6f0e7a40ffa16e994c343ccd86.australia-southeast1.gcp.elastic-cloud.com/ \
APP_SEARCH_API_KEY= { your private app search API key here } \
APP_SEARCH_ENGINE_NAME=space-shuttle-engine \
And then execute the following command:
npx @elastic/app-search-firestore-extension import
However, I have no idea where to add these variables. I created an env file and pasted in the above code with correct values but it doesn't seem to work. When I run the npx import command, it says:
Please provide a COLLECTION_PATH environment variable
When I try to add these variables using npm, I get the following error:
Invalid config name COLLECTION_PATH, cannot use upper case.
P.S : I am super new to Firebase Cloud Functions, Elastic Search and Javascript.
Any help is greatly appreciated.