From 9bc47aeb3d7417638c896e4f79d5c9d4c4109719 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 5 Mar 2024 17:09:09 +0100 Subject: [PATCH] bugfix: do not kill stderr ;-) --- index.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.cgi b/index.cgi index 50fb338..d936d40 100755 --- a/index.cgi +++ b/index.cgi @@ -234,7 +234,7 @@ elif [ "$REQUEST_METHOD" = "POST" ]; then )" results="${results% }" - cat <<-EOF + debug <<-EOF Status: 200 OK X-elastic-product: Elasticsearch Content-Type: application/vnd.elasticsearch+json;compatible-with=8 @@ -244,7 +244,7 @@ elif [ "$REQUEST_METHOD" = "POST" ]; then "_shards":{"total":1,"successful":1,"skipped":0,"failed":0}, "hits": { "total":{"value": $(DB2 "$results" count @) ,"relation":"eq"}, - "max_score": $(json_get "arr:$results" '[0]._score' 2>&- || printf 0), + "max_score": $(json_get "arr:$results" '[0]._score' 2>/dev/null || printf 0), "hits": $(json_dump "arr:$results") } } -- 2.39.2