DDD Meilisearch showcase: domain/app/infra/interfaces, Taskfile, tests
This commit is contained in:
commit
a9674ce14e
22 files changed
+1584
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Example queries showing off Meilisearch behaviour through the demo API.
|
||||
# Requires the API to be running (task run) and the index seeded (task seed).
|
||||
set -euo pipefail
|
||||
|
||||
API="${API:-http://localhost:8080}"
|
||||
|
||||
show() {
|
||||
echo
|
||||
echo "=== $1"
|
||||
shift
|
||||
curl -fsS "$@" | (command -v jq >/dev/null && jq . || cat)
|
||||
}
|
||||
|
||||
show "typo tolerance: 'matrx' still finds The Matrix" "$API/search?q=matrx&limit=3"
|
||||
show "prefix search while typing: 'spid'" "$API/search?q=spid&limit=3"
|
||||
show "full-text over the overview field: 'dream'" "$API/search?q=dream&limit=3"
|
||||
show "facet + filter: sci-fi after 2000, rating >= 8" "$API/search?q=&genre=Sci-Fi&min_year=2000&min_rating=8"
|
||||
show "empty query: facets + ranking rule rating:desc" "$API/search?q=&limit=5"
|
||||
show "single document by id" "$API/movies/1"
|
||||
Reference in new issue
Block a user