POC showcasing the use of LunrJS with Lambda for a server side serverless search api.
This example was made to use 2 data sources not provided in this example but easily accessible from their original sources:
The sources are CSV files uploaded to S3. The index is generated when a new file is uploaded.
cp -a config/dev.sample.yml config/dev.yml
Edit config/dev.yml
to your needs.
npx sls deploy
Take note of the bucket name and Lambda-URI endpoints.
aws s3 cp lego_sets.csv s3://<myBucket>/source/lego_sets.csv
aws s3 cp imdb_movies.csv s3://<myBucket>/source/imdb_movies.csv
Pass a valid LunrJS query in the search
parameter (URLEncoded):
curl "https://<SearchLegoLambdaURIEndpoint>/?search=%2Byear:1984%20%2Btheme:duplo"