Skip to content

Choose what is indexed

Every host has a scope: a short document that says which items are indexed and how deeply. The defaults are good for a personal folder. Change them when a folder is large, old, or full of files you never search.

depth the index keeps you can
exclude nothing nothing: the item does not exist for inseam
catalog the address, size, dates, type and title find it by name, read it
embed all of that and the text find it by what it says
enrich all of that, and the words a model reads in it: the text in an image, the speech in a recording find a screenshot or a voice memo by its words. It needs an enrich plugin turned on for the host; each object costs a little from the network’s model balance

The default for a folder is: everything from the last year at embed, everything older at catalog, and the usual noise at exclude.

{
"window": { "by": "mtime", "within": "1y", "outside": "catalog" },
"rules": [
{ "when": { "path": { "glob": "**/node_modules/**" } }, "then": "exclude" },
{ "when": { "size": { "gt": 26214400 } }, "then": "catalog" },
{ "then": "embed" }
],
"limits": { "maxObjectBytes": 268435456, "maxTextBytes": 2097152 }
}
  • window: items changed within the duration get the depth the rules give them. Items outside the window get at most outside. Durations are 6m, 1y, 2w, 30d, 12h; m is 30 days and y is 365.
  • rules: in order, first match wins. A rule’s when conditions are all required. The last rule has no when and sets the default.
  • limits: items over maxObjectBytes are never read; text over maxTextBytes is cut.
on you can write
path {"glob": "**/*.pdf"}, {"prefix": "Archive/"}, {"eq": "notes.md"}, {"in": ["a.md", "b.md"]}
ext the same four, on the lowercased extension without the dot: {"in": ["log", "tmp"]}
mime the same four, on the type: {"prefix": "image/"}
size {"gt": 26214400}, {"lte": 1024} (bytes; gt, gte, lt, lte)
mtime {"within": "90d"}, {"before": "2024-01-01T00:00:00Z"}, {"after": "…"}

Globs: * matches anything except /, ** matches across folders, ? one character, {a,b} either. A pattern without a / matches the file name only, so *.log matches a log anywhere. A pattern with a / matches the whole path within the host.

Index a photo library by name only, and skip the sidecar files:

{ "rules": [
{ "when": { "ext": { "in": ["xmp", "aae"] } }, "then": "exclude" },
{ "then": "catalog" } ] }

Index a project’s documents fully and nothing else:

{ "rules": [
{ "when": { "path": { "glob": "docs/**" } }, "then": "embed" },
{ "then": "exclude" } ] }

Index everything from the last 90 days, keep the rest by name:

{ "window": { "by": "mtime", "within": "90d", "outside": "catalog" }, "rules": [ { "then": "embed" } ] }

In the app, open Hosts and select the host. What to index shows the scope and what it produced: the items at each depth and, for a cloud account, each source with its item count. Select Edit the scope to change it. The editor sets a depth per source, the age window, the rules and the limits, or takes the JSON document as it is. Only the host’s creator or a network admin can change it.

Or with the API:

Terminal window
curl -X PUT https://inseam.io/v1/hosts/h1a2b3c4d5e6/scope \
-H "Authorization: Bearer ias_…" -H "Content-Type: application/json" \
-d '{"rules": [{"then": "embed"}]}'

A new scope applies to new and changed items at once. Items already indexed deeper than the new scope allows are reduced on the host’s next walk; items that the new scope indexes deeper are re-read then. For a cloud account, saving the scope starts that walk at once. The exact grammar is in the scope reference.