#
d = []
with open(file, 'r') as f:
for i in f:
print(i)
d.append(i)
byte_count = 8
with open("myfile", "rb") as f:
byte = f.read(byte_count)
while byte != b"":
# Do stuff with byte.
byte = f.read(byte_count)
The schema in Elasticsearch is a mapping that describes the the fields in the JSON documents along with their data type, as well as how they should be indexed in the Lucene indexes that lie under the hood.