This file contains 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
# Delete the index if exists | |
$ curl -XDELETE "http://localhost:9200/sample" | |
{"acknowledged":true} | |
# Create "sample" index, with standard analyzer using comma character for tokenizing | |
$ curl -XPUT "http://localhost:9200/sample" -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |
This file contains 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
# -*- coding: utf-8 -*- | |
import logging | |
import pika | |
import json | |
import time | |
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' | |
'-35s %(lineno) -5d: %(message)s') | |
LOGGER = logging.getLogger(__name__) | |
NewerOlder