mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: list documents supports range filtering (#9214)
### What problem does this PR solve? list_document supports range filtering. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -507,7 +507,16 @@ print(doc)
|
||||
### List documents
|
||||
|
||||
```python
|
||||
Dataset.list_documents(id:str =None, keywords: str=None, page: int=1, page_size:int = 30, order_by:str = "create_time", desc: bool = True) -> list[Document]
|
||||
Dataset.list_documents(
|
||||
id: str = None,
|
||||
keywords: str = None,
|
||||
page: int = 1,
|
||||
page_size: int = 30,
|
||||
order_by: str = "create_time",
|
||||
desc: bool = True,
|
||||
create_time_from: int = 0,
|
||||
create_time_to: int = 0
|
||||
) -> list[Document]
|
||||
```
|
||||
|
||||
Lists documents in the current dataset.
|
||||
@ -541,6 +550,12 @@ The field by which documents should be sorted. Available options:
|
||||
|
||||
Indicates whether the retrieved documents should be sorted in descending order. Defaults to `True`.
|
||||
|
||||
##### create_time_from: `int`
|
||||
Unix timestamp for filtering documents created after this time. 0 means no filter. Defaults to 0.
|
||||
|
||||
##### create_time_to: `int`
|
||||
Unix timestamp for filtering documents created before this time. 0 means no filter. Defaults to 0.
|
||||
|
||||
#### Returns
|
||||
|
||||
- Success: A list of `Document` objects.
|
||||
|
||||
Reference in New Issue
Block a user