From 28aafe7f68cda75a033a1fcdc088f6a7ef1404c9 Mon Sep 17 00:00:00 2001 From: Gina White Date: Fri, 30 Dec 2022 16:59:03 -0800 Subject: [PATCH 1/2] demonstrate query using curl It took me a while to figure this out, perhaps it will help other people to have an example --- clients/curl/example.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clients/curl/example.sh b/clients/curl/example.sh index 50ed2c52b..fd87d6bfe 100755 --- a/clients/curl/example.sh +++ b/clients/curl/example.sh @@ -40,3 +40,6 @@ curl -v -u $AUTH http://$BSHOST/camli/enumerate-blobs?limit=1 # List offset -- 200 with list of no blobs curl -v -u $AUTH http://$BSHOST/camli/enumerate-blobs?after=sha1-126249fd8c18cbb5312a5705746a2af87fba9538 + +# Search for all images +echo '{"expression":"is:image","describe":{"rules":[{"attrs":["camliContent"]}]}}' | curl -v --data-binary @- -u $AUTH http://localhost:3179/my-search/camli/search/query From 0c2a1b8c657a60a60ed5f343dd6d0a6cd7a0ee53 Mon Sep 17 00:00:00 2001 From: Gina White Date: Mon, 2 Jan 2023 15:43:48 -0800 Subject: [PATCH 2/2] introduce SEARCHHOST variable --- clients/curl/example.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/curl/example.sh b/clients/curl/example.sh index fd87d6bfe..3e6bee2e8 100755 --- a/clients/curl/example.sh +++ b/clients/curl/example.sh @@ -4,6 +4,7 @@ # Configuration variables here: BSHOST=localhost:3179/bs +SEARCHHOST=localhost:3179/my-search BSUSER=user BSPASS=foo @@ -42,4 +43,4 @@ curl -v -u $AUTH http://$BSHOST/camli/enumerate-blobs?limit=1 curl -v -u $AUTH http://$BSHOST/camli/enumerate-blobs?after=sha1-126249fd8c18cbb5312a5705746a2af87fba9538 # Search for all images -echo '{"expression":"is:image","describe":{"rules":[{"attrs":["camliContent"]}]}}' | curl -v --data-binary @- -u $AUTH http://localhost:3179/my-search/camli/search/query +echo '{"expression":"is:image","describe":{"rules":[{"attrs":["camliContent"]}]}}' | curl -v --data-binary @- -u $AUTH $SEARCHHOST/camli/search/query