description: A structured, queryable unit of data extracted from your pages (e.g. tasks, items, paragraphs). tags: glossary references:

  • client/data/object_index.ts
  • plugs/index/indexer.ts
  • plug-api/types/index.ts

SilverBullet automatically maintains an Concepts/Object Index extracted from all Markdown pages in your Space.

Objects are a feature that powers a lot of SilverBullet functionality, including the Features/Page Picker, Linked Mentions and many others. They can also be queried by the user directly, typically via Space Lua/Integrated Query.

There are various ways to visualize what objects exist:

Terminology

  • Object: represent things in your space at various level of granularity. Examples include Object/page at the highest level, but also more granular things like Object/task and Object/link. In relational database parlance, you can think of Objects as database rows.
  • Concepts/Tag: represent Object types or tables (in relational database parlance). Every Object has at least one tag, but can have additional tags attached explicitly, usually through the Markdown/Hashtags syntax.

Principles

Markdown always is the source of truth: all data indexed as objects will have some representation in markdown text as well.

As a result, the Concepts/Object Index can be flushed at any time and be rebuilt from its source markdown files kept in your space (and you can do so on demand using the Space: Reindex command).

Object representation

Every object has a set of Attributes, some predefined, but you can add additional custom attributes.

The following attributes are predefined, you can expect all objects to have them:

  • ref: a globally unique identifier, often represented as a pointer to the place (page, position) in your space where the object is defined. For instance, a page object will use the page name as its ref attribute, and a task will use page@pos (where pos is the location the task appears in page). When an Markdown/Anchor ($my-anchor) is present in the object's source, the anchor name replaces the default ref (so that same task with $rent becomes ref: "rent").
  • tag: the main type, or “tag” of the object.

In addition, most objects will also contain:

  • tags: an optional set of additional, explicitly assigned tags.
  • itags: a set of implicit or inherited tags: including the object’s tag, tags as well as any tags assigned to its containing page.
  • inComment: true on any object that originates inside an HTML Markdown/Comment. Absent otherwise.

Beside these, any number of additional tag-specific and custom Attributes can be defined. It is also possible to restrict this set of attributes via Concepts/Schema.

SilverBullet also supports Features/X-Ray, which will visually annotate the identified and indexed objects in the editor directly.