Added pagerank support to infinity (#4059)

### What problem does this PR solve?

Added pagerank support to infinity

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Zhichang Yu
2024-12-17 15:45:01 +08:00
committed by GitHub
parent fddac1345d
commit bcccaccc2b
2 changed files with 18 additions and 9 deletions

View File

@ -107,6 +107,7 @@ def update():
settings.docStoreConn.update({"kb_id": kb.id}, {"pagerank_fea": req["pagerank"]},
search.index_name(kb.tenant_id), kb.id)
else:
# Elasticsearch requires pagerank_fea be non-zero!
settings.docStoreConn.update({"exist": "pagerank_fea"}, {"remove": "pagerank_fea"},
search.index_name(kb.tenant_id), kb.id)