def create_vectors(storage, segment): vectorfile = storage.create_file(segment.vector_filename) return FileTableWriter(vectorfile, keycoder=encode_vectorkey, valuecoder=packint)
def create_terms(storage, segment): termfile = storage.create_file(segment.term_filename) return FileTableWriter(termfile, keycoder=encode_termkey, valuecoder=encode_terminfo)