From 04ce3a9bad64d9665388ea82ddc92e25a3238d66 Mon Sep 17 00:00:00 2001 From: Erin Geier <115035002+emgeier@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:58:27 -0600 Subject: [PATCH] person test dates to integers --- .github/workflows/main.yml | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca0beb8619..e5ee1e22dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -120,7 +120,7 @@ jobs: # Extract the filename and create the index header for OpenSearch bulk format filename=$(basename ${file%.xml}) echo "Processing $filename for JSON" - printf "{\"index\":{\"_index\":\"syriaca-index-2\",\"_id\":\"$type-$filename\"}}\n" >> bulk_data.json + printf "{\"index\":{\"_index\":\"syriaca-index-3\",\"_id\":\"$type-$filename\"}}\n" >> bulk_data.json # Apply XSLT for JSON conversion and append it to bulk_data.json directly java -jar saxon.jar -s:$file -xsl:json-stylesheet.xsl docType="$type" | tr -d '\n' >> bulk_data.json @@ -167,7 +167,7 @@ jobs: # Step 7: Upload files to S3 - name: Upload JSON file to S3 run: | - aws s3 cp bulk_data.json s3://srophe-syriaca-front-end/json-data/advancedsearchfields/bulk_data_persons_spacing_title.json + aws s3 cp bulk_data.json s3://srophe-syriaca-front-end/json-data/advancedsearchfields/bulk_data_persons_spacing_dates.json env: AWS_REGION: ${{ secrets.AWS_REGION }} AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} @@ -195,23 +195,23 @@ jobs: # Step 8: Upload JSON data to OpenSearch - - name: JSON file to OpenSearch + # - name: JSON file to OpenSearch - env: - OPENSEARCH_URL: ${{ secrets.OPENSEARCH_URL }} - OPENSEARCH_USER: ${{ secrets.OPENSEARCH_USER }} - OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} - run: | - RESPONSE=$(curl -s -o response.json -w "%{http_code}" -XPOST "$OPENSEARCH_URL/_bulk" \ - -H "Content-Type: application/json" \ - -u "$OPENSEARCH_USER:$OPENSEARCH_PASSWORD" \ - --data-binary "@bulk_data.json") - echo "HTTP response code: $RESPONSE" - cat response.json - - # Check for errors in the response - if grep -q '"errors":true' response.json; then - echo "Errors occurred during bulk upload" - exit 1 - fi + # env: + # OPENSEARCH_URL: ${{ secrets.OPENSEARCH_URL }} + # OPENSEARCH_USER: ${{ secrets.OPENSEARCH_USER }} + # OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} + # run: | + # RESPONSE=$(curl -s -o response.json -w "%{http_code}" -XPOST "$OPENSEARCH_URL/_bulk" \ + # -H "Content-Type: application/json" \ + # -u "$OPENSEARCH_USER:$OPENSEARCH_PASSWORD" \ + # --data-binary "@bulk_data.json") + # echo "HTTP response code: $RESPONSE" + # cat response.json + + # # Check for errors in the response + # if grep -q '"errors":true' response.json; then + # echo "Errors occurred during bulk upload" + # exit 1 + # fi