Estoy tratando de integrar Elastic Search en una aplicación de Flutter. Configuré la conexión con éxito, sin embargo, tengo muchos datos existentes que necesito importar a Elastic Search. La documentación de Google me dice que agregue las siguientes variables de entorno:
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 \Y luego ejecuta el siguiente comando:
npx @elastic/app-search-firestore-extension importSin embargo, no tengo idea de dónde agregar estas variables. Creé un archivo env y pegué el código anterior con los valores correctos, pero parece que no funciona. Cuando ejecuto el comando de importación npx, dice:
Please provide a COLLECTION_PATH environment variableCuando intento agregar estas variables usando npm, aparece el siguiente error:
Invalid config name COLLECTION_PATH, cannot use upper case.PD: Soy muy nuevo en Firebase Cloud Functions, Elastic Search y Javascript.
Cualquier ayuda es muy apreciada.