mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 分词检索历史数据处理 (#203)
This commit is contained in:
parent
c682d44671
commit
bc57f17337
|
|
@ -31,12 +31,14 @@ def save_keywords(apps, schema_editor):
|
|||
'paragraph')
|
||||
embedding_update_list = [update_embedding_search_vector(embedding, paragraph_list) for embedding
|
||||
in embedding_list]
|
||||
child_array = sub_array(embedding_update_list, 20)
|
||||
child_array = sub_array(embedding_update_list, 50)
|
||||
for c in child_array:
|
||||
try:
|
||||
embedding.objects.using(db_alias).bulk_update(c, ['search_vector'])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
document.status = Status.success
|
||||
document.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
|||
Loading…
Reference in New Issue