Skip to content

epomatti/aws-cloudsearch

Repository files navigation

AWS CloudSearch

Infrastructure

Create the infrastructure:

terraform init terraform apply -auto-approve

Terraform will also create the search indexes.

Search

Upload documents

Upload the file batch:

aws cloudsearchdomain upload-documents \ --endpoint-url $documentEndpoint \ --content-type 'application/json' \ --documents 'movies-batch.json' \ --region 'us-east-1'

Send a search

Search with a query:

aws cloudsearchdomain search \ --endpoint-url $searchEndpoint \ --search-query 'Matrix' \ --region 'us-east-1'

Get suggestions

Create a suggester:

aws cloudsearch define-suggester \ --domain-name 'movies-domain' \ --suggester 'SuggesterName=movie_suggester,DocumentSuggesterOptions={SourceField=title,FuzzyMatching=none}' \ --region 'us-east-1'

Index the documents again (this can take a while):

aws cloudsearch index-documents \ --domain-name 'movies-domain' \ --region 'us-east-1'

Retrieves autocomplete suggestions for a partial query string:

aws cloudsearchdomain suggest \ --endpoint-url $searchEndpoint \ --suggester 'movie_suggester' \ --suggest-query 'Matrix' \ --region 'us-east-1' \ --size 3

About

AWS CloudSearch sandbox

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages