问题描述
DocumentStore 用于索引。 我使用过 elasticsearch.ElasticsearchDocumentStore。 但是不要为每个新索引更改哪里。我想在文件上传时通过并想创建新索引。 文件上传代码如下
for file in files:
try:
file_path = Path(FILE_UPLOAD_PATH) / f"{uuid.uuid4().hex}_{file.filename}"
with file_path.open("wb") as buffer:
shutil.copyfileobj(file.file,buffer)
file_paths.append(file_path)
Meta["name"] = file.filename
file_Metas.append(Meta)
finally:
file.file.close()
INDEXING_PIPELINE.run(
file_paths=file_paths,remove_numeric_tables=remove_numeric_tables,remove_whitespace=remove_whitespace,remove_empty_lines=remove_empty_lines,remove_header_footer=remove_header_footer,valid_languages=valid_languages,split_by=split_by,split_length=split_length,split_overlap=split_overlap,split_respect_sentence_boundary=split_respect_sentence_boundary,Meta=file_Metas,)
任何人都可以帮我解决这个问题。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)