How it works
Bag of words treats the directory as a file catalog, not a database. The agent gets filesystem primitives:
Everything is confined to
root_path. A file id is its POSIX path relative to the root, and any id that escapes the root — .., an absolute path, a symlink pointing outside — is rejected. If you set include_globs, files outside those patterns are not merely hidden from listings: reading them is denied.
.csv, .tsv, .xlsx and .xls are parsed into tables. .pdf, .docx and .pptx have their text extracted. Plain-text formats (.txt, .md, .json, .html, .log, .yaml, .xml, .py, .sql) are read as text. Anything else is matched by name only.
Before you start
- The directory must exist on the Bag of words backend host and be readable by the process that runs it. Bag of words does not mount anything itself.
- For a network share, mount it with the OS first (
/etc/fstab,mount -t cifs,mount -t nfs, an autofs map, or a container volume). There are no credential fields on this connector — the share’s authentication is handled entirely by the mount. - If Bag of words runs in a container, the mount must be visible inside the container (bind-mount or volume), not just on the host.
- For a writable connection, the backend process needs write permission on the mount.
Connect in Bag of words
Go to Data Sources → Add data source → Files and Directories and fill in the form.allowed_extensions and index_content are deprecated. They still work on existing connections, but use include_globs with a pattern like **/*.pdf instead of allowed_extensions, and index_mode instead of index_content.Indexing modes
index_mode controls how much Bag of words caches. Reads are always live regardless of the mode.
Authentication
This connector has a single mode, No Authentication (none), scoped to the system. Access is whatever the backend host’s OS grants on the mount — there is nothing to enter in Bag of words. To give different teams different slices of a share, create several connections with different root_path or include_globs values and set access rules per connection. See Authentication and access.
Troubleshooting
The connection tests fine but no files appear
The connection tests fine but no files appear
Check
include_globs. Patterns are matched relative to root_path, so /mnt/contracts/reports/*.pdf will never match — write reports/*.pdf. Also confirm recursive is on if the files live in subfolders.Only part of the directory is catalogued
Only part of the directory is catalogued
The tree exceeded
max_catalog_objects and was truncated. Narrow the connection with include_globs or a deeper root_path rather than raising the cap.A file is listed but cannot be read
A file is listed but cannot be read
Either it is larger than
max_file_mb, or it is outside include_globs (in which case access is denied by design), or the backend process lacks read permission on it.Writes fail on a writable connection
Writes fail on a writable connection
writable only removes the product-side block. The mount and the backend process’s OS permissions must also allow writing.Related
- Amazon S3 — the same file catalog, over object storage.
- SharePoint and OneDrive — document libraries over Microsoft Graph.
- CSV and QVD — when you want files exposed as SQL tables instead of documents.
