setNodeFilter(expr, force) {

    expr = expr.replace(/[\n\r]/g, ' ');

    if (this.getNodeFilter('raw') === expr) {
      // already up to date;
      // This check is critical to prevent recursion!
      return;
    }

    utils.setField(this.nodeFilterTRef, 'filter', expr);

    $tm.logger('debug', 'Node filter set to', expr);

  }
Sets and rebuilds the node filter according to the expression provided.

@param {string} expr - A tiddlywiki filter expression.
@param {boolean} force