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
curl -XGET 'http://localhost:9200/keywords/pt_BR/_search?pretty=true' -d ' | |
{ | |
"query": { | |
"fuzzy": { | |
"keyword": { | |
"value": "hoteis sao paulo", | |
"prefix_length": 0, | |
"min_similarity": 0.6 | |
} | |
} |
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
# Mappings | |
curl -XGET 'http://localhost:9200/tokens,keywords/_mapping?pretty=true' | |
{ | |
"keywords" : { | |
"pt_BR" : { | |
"properties" : { | |
"keyword" : { | |
"type" : "string", | |
"boost" : 10.0, | |
"analyzer" : "keyword", |
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
import eventlet | |
import tasks | |
json = eventlet.import_patched('json') | |
from eventlet.queue import LightQueue | |
from time import sleep | |
eventlet.monkey_patch() | |
def processTask(cfgFile): | |
print ("Processing stuff here") |
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
import eventlet | |
import tasks | |
#from json import dump, load | |
from django.conf import settings | |
from glob import glob | |
json = eventlet.import_patched('json') | |
eventlet.monkey_patch() | |
poll = eventlet.GreenPool() |
NewerOlder