mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-30 00:32:30 +08:00
Fix: parent-children pipleine bad case. (#12246)
### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -92,9 +92,9 @@ class Splitter(ProcessBase):
|
||||
continue
|
||||
split_sec = re.split(r"(%s)" % custom_pattern, c, flags=re.DOTALL)
|
||||
if split_sec:
|
||||
for txt in split_sec:
|
||||
for j in range(0, len(split_sec), 2):
|
||||
docs.append({
|
||||
"text": txt,
|
||||
"text": split_sec[j],
|
||||
"mom": c
|
||||
})
|
||||
else:
|
||||
@ -155,9 +155,9 @@ class Splitter(ProcessBase):
|
||||
split_sec = re.split(r"(%s)" % custom_pattern, c["text"], flags=re.DOTALL)
|
||||
if split_sec:
|
||||
c["mom"] = c["text"]
|
||||
for txt in split_sec:
|
||||
for j in range(0, len(split_sec), 2):
|
||||
cc = deepcopy(c)
|
||||
cc["text"] = txt
|
||||
cc["text"] = split_sec[j]
|
||||
docs.append(cc)
|
||||
else:
|
||||
docs.append(c)
|
||||
|
||||
Reference in New Issue
Block a user