From 5e22491248135aadf55b30f170a16c6095a34349 Mon Sep 17 00:00:00 2001 From: Zack Wynne Date: Fri, 30 Jun 2023 13:30:55 +0000 Subject: [PATCH] (feat): add ES mapping for comments #2560 --- .../provision-elasticsearch.sh | 1 + .../schema/minds-comments.json | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 containers/elasticsearch-provisioner/schema/minds-comments.json diff --git a/containers/elasticsearch-provisioner/provision-elasticsearch.sh b/containers/elasticsearch-provisioner/provision-elasticsearch.sh index 46a39f4cd..9c3946507 100755 --- a/containers/elasticsearch-provisioner/provision-elasticsearch.sh +++ b/containers/elasticsearch-provisioner/provision-elasticsearch.sh @@ -20,5 +20,6 @@ curl -s --write-out ' Status: %{http_code}\n' -X PUT http://$1:9200/minds-offcha curl -s --write-out ' Status: %{http_code}\n' -X PUT http://$1:9200/minds-transactions-onchain -d @./schema/minds-transactions-onchain.json --header "Content-Type: application/json" curl -s --write-out ' Status: %{http_code}\n' -X PUT http://$1:9200/minds-graph-subscriptions -d @./schema/minds-graph-subscriptions.json --header "Content-Type: application/json" curl -s --write-out ' Status: %{http_code}\n' -X PUT http://$1:9200/minds-graph-pass -d @./schema/minds-graph-pass.json --header "Content-Type: application/json" +curl -s --write-out ' Status: %{http_code}\n' -X PUT http://$1:9200/minds-comments -d @./schema/minds-comments.json --header "Content-Type: application/json" echo "elastic search is ready!" diff --git a/containers/elasticsearch-provisioner/schema/minds-comments.json b/containers/elasticsearch-provisioner/schema/minds-comments.json new file mode 100644 index 000000000..beb2039e9 --- /dev/null +++ b/containers/elasticsearch-provisioner/schema/minds-comments.json @@ -0,0 +1,51 @@ +{ + "mappings": { + "properties": { + "@timestamp": { + "type": "date" + }, + "updated_at": { + "type": "date" + }, + "guid": { + "type": "long" + }, + "entity_guid": { + "type": "long" + }, + "owner_guid": { + "type": "long" + }, + "parent_guid": { + "type": "long" + }, + "parent_depth": { + "type": "integer" + }, + "body": { + "type": "text" + }, + "mature": { + "type": "boolean" + }, + "edited": { + "type": "boolean" + }, + "spam": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "access_id": { + "type": "long" + }, + "group_conversation": { + "type": "boolean" + } + } + } +}