Search Portals allow you to easily gather together Rem that match certain criteria. The RemNote Query Language specifies what Rem will be matched.

The Query Builder

For those new to creating queries in RemNote, we recommend using the Query Builder, which provides a graphical interface for selecting your queries. You can open the Query Builder by clicking on the filter icon next to a search portal.

You can switch back and forth between using the Query Builder and directly editing the search query in the text box at any time.

Query Syntax

Once you're familiar with creating queries in RemNote, it may sometimes be faster and easier to write queries directly. Here's the syntax you can use to do that.

Connections

Here, SomeRem represents a Rem Reference inserted into the query with [[.

  • SomeRem: Matches Rem that reference SomeRem.

  • #SomeRem: Matches Rem tagged with SomeRem.

  • @SomeRem: Matches documents that contain SomeRem, either as a direct descendant or as a portal. (Documents that contain a reference to SomeRem are not included; if you want this behavior, try *SomeRem, explained below.)

  • ^SomeRem: Matches Rem that you can see if you open the document SomeRem. This includes Rem in fixed portals, but not search portals, and does not include Rem that are children of collapsed Rem.

  • ^^SomeRem: Matches Rem that are direct descendants of SomeRem. This does not include Rem in portals, but does include Rem that are children of collapsed Rem.

  • *SomeRem: Matches Rem that are connected to SomeRem through any kind of link (reference, tag, descendant, etc.).

Miscellaneous

  • "text": Matches Rem that contain the string of text within the quotation marks.

  • remType:concept, remType:descriptor, remType:none: Matches Rem that are Concepts, Descriptors, or neither.

  • ~: The tilde never matches anything. You can use this as a placeholder for an expression to be inserted later.

Boolean operators

Search terms above can be combined into expressions using and, or, and not, and grouped using parentheses. Here, X, Y, and Z represent connections or miscellaneous search terms from the lists above.

and and or have the same precedence and are evaluated from left to right. not has higher precedence than either.

  • X and Y: Matches Rem that match both terms X and Y.

  • X or Y: Matches Rem that match either term X or term Y, or both.

  • not X: Matches Rem that do not match term X.

  • X and (Y or Z): Matches Rem that match both X, and either Y or Z.

  • X and not Y or Z: Matches Rem that match X, but do not match Y; or Rem that match Z, irrespective of whether they match X or Y.

Did this answer your question?