From 4a2f27d5f68a9fc51a99b8bcd86a9c5f811511d8 Mon Sep 17 00:00:00 2001 From: booboy Date: Sat, 2 Feb 2019 00:37:05 -0600 Subject: [PATCH] was getting errors for previous mapping when trying to auto increment index with post requests, hopefully this fixes that. --- lib/elastic_search_helper.rb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/elastic_search_helper.rb b/lib/elastic_search_helper.rb index cf24423..67c2b7e 100644 --- a/lib/elastic_search_helper.rb +++ b/lib/elastic_search_helper.rb @@ -23,12 +23,19 @@ class ElasticSearchHelper "mappings": { "_doc": { "properties": { - "paste_metadata": { - "type": "nested" + "paste_metadata": { "type": "nested" } + "properties": { + "scrape_url": { "type": "string" }, + "full_url": { "type": "string" }, + "date": { "type": "string" }, + "size": { "type": "string" }, + "expire": { "type": "string" }, + "title": { "type": "string" }, + "syntax": { "type": "string" }, + "user": { "type": "string" }, + "hits": { "type": "string" } }, - "paste_text": { - "type": "text" - } + "paste_text": { "type": "text" } } } }