This folder contains common scripts used across all serverless implementations.
Creates a Full Text Search index (hotel-geo-index) with geo-spatial mapping for hotel proximity searches.
Prerequisites:
- Couchbase Capella cluster with Data API enabled
- travel-sample bucket loaded with hotel documents in
inventory.hotelcollection - Hotels must have geo coordinates (
geo.latandgeo.lonfields) for proximity search
Usage:
- Set your environment variables:
export DATA_API_USERNAME="your_username"
export DATA_API_PASSWORD="your_password"
export DATA_API_ENDPOINT="your_endpoint"- Run the script:
node scripts/create-fts-index.jsNote: The index is built in the background after creation. Wait for the index to be ready before using hotel proximity search functionality.