This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/python3 | |
| # A description and analysis of this code can be found at | |
| # https://alexmarquardt.com/2018/07/23/deduplicating-documents-in-elasticsearch/ | |
| # Original code from | |
| # https://github.com/alexander-marquardt/deduplicate-elasticsearch/ | |
| import hashlib | |
| from elasticsearch import Elasticsearch, helpers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### REINIT | |
| DELETE user | |
| PUT user | |
| { | |
| "mappings": { | |
| "properties": { | |
| "name": { | |
| "type": "text" | |
| }, | |
| "comments": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function DOMtoJSON(node) { | |
| node = node || this; | |
| let obj = { | |
| nodeType: node.nodeType | |
| }; | |
| if (node.tagName) { | |
| obj.tagName = node.tagName.toLowerCase(); | |
| } else if (node.nodeName) { | |
| obj.nodeName = node.nodeName; |