Skip to content

Instantly share code, notes, and snippets.

@paweloque
paweloque / search_as_you_type
Created March 15, 2021 21:41 — forked from xeraa/search_as_you_type
Elasticsearch's search_as_you_type and completion suggester fields in action
PUT jobs
{
"mappings": {
"properties": {
"title": {
"type": "search_as_you_type"
}
}
}
}
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