mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add doc ids to chat (#1944)
### What problem does this PR solve? ### Type of change - [x] Performance Improvement
This commit is contained in:
@ -138,6 +138,8 @@ class Dealer:
|
||||
es_logger.info("TOTAL: {}".format(self.es.getTotal(res)))
|
||||
if self.es.getTotal(res) == 0 and "knn" in s:
|
||||
bqry, _ = self.qryr.question(qst, min_match="10%")
|
||||
if req.get("doc_ids"):
|
||||
bqry = Q("bool", must=[])
|
||||
bqry = self._add_filters(bqry, req)
|
||||
s["query"] = bqry.to_dict()
|
||||
s["knn"]["filter"] = bqry.to_dict()
|
||||
|
||||
Reference in New Issue
Block a user