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
set -x | |
curl -XDELETE 'http://localhost:9200/twitter' | |
curl -XPUT 'http://localhost:9200/twitter' -d '{ | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"test_analyzer" : { | |
"type" : "custom", |
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/bin/env python | |
import sys | |
from collections import defaultdict | |
def setup_mapping(): | |
'''mapping character to number of enclosed circles in the character''' | |
m = defaultdict(int) |