Skip to content

Instantly share code, notes, and snippets.

@paweloque
paweloque / search_as_you_type
Created Mar 15, 2021 — forked from xeraa/search_as_you_type
Elasticsearch's search_as_you_type and completion suggester fields in action
View search_as_you_type
PUT jobs
{
"mappings": {
"properties": {
"title": {
"type": "search_as_you_type"
}
}
}
}
View Traverse Files and Rename
from os import listdir, rename
from os.path import isfile, join
#path = '/Volumes/HD-PATU3/Pawel/Pictures'
path = './'
for f in listdir(path):
if not isfile(join(path, f)):
spl = f.split('_')
#print 'File: %s' % f