Folder Management
Organize and isolate data into logical folder groups in Morphik
Overview
Folders in Morphik provide a way to organize documents into logical groups. This is particularly useful for multi-project environments where you want to maintain separation between different contexts. Documents within a folder are isolated from those in other folders, allowing for clean organization and data separation.
Creating and Accessing Folders
Operations Within a Folder
Once you have a folder object, all operations performed on it are scoped to that folder. Documents created, retrieved, or manipulated will be contained within this folder’s scope.
Folder Methods
All the core document operations available on the main Morphik client are also available on folder objects, but they are automatically scoped to the specific folder:
ingest_text
- Ingest text content into this folderingest_file
- Ingest a file into this folderingest_files
- Ingest multiple files into this folderingest_directory
- Ingest all files from a directory into this folderretrieve_chunks
- Retrieve chunks matching a query from this folderretrieve_docs
- Retrieve documents matching a query from this folderquery
- Generate a completion using context from this folderlist_documents
- List all documents in this folderbatch_get_documents
- Get multiple documents by their IDs from this folderbatch_get_chunks
- Get specific chunks by source from this foldercreate_graph
- Create a knowledge graph from documents in this folderupdate_graph
- Update a knowledge graph with new documents from this folderdelete_document_by_filename
- Delete a document by filename from this folder
Example: Project Document Management
A common use case for folders is separating different projects. Here’s an example of how to organize project documentation:
Accessing a Folder’s User Scope
You can further scope operations within a folder to a specific user by using the signin
method on the folder object:
See User Management for more details on working with user scopes.
Was this page helpful?