diff --git a/core/modules/filters/search.js b/core/modules/filters/search.js index a0826f44a..933cf7419 100644 --- a/core/modules/filters/search.js +++ b/core/modules/filters/search.js @@ -17,10 +17,18 @@ Export our filter function */ exports.search = function(source,operator,options) { var invert = operator.prefix === "!"; - return options.wiki.search(operator.operand,{ - source: source, - invert: invert - }); + if(operator.suffix) { + return options.wiki.search(operator.operand,{ + source: source, + invert: invert, + field: operator.suffix + }); + } else { + return options.wiki.search(operator.operand,{ + source: source, + invert: invert + }); + } }; })(); diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 455c29e09..bc0d4ee83 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -969,6 +969,7 @@ Options available: invert: If true returns tiddlers that do not contain the specified string caseSensitive: If true forces a case sensitive search literal: If true, searches for literal string, rather than separate search terms + field: If specified, restricts the search to the specified field */ exports.search = function(text,options) { options = options || {}; @@ -1007,13 +1008,17 @@ exports.search = function(text,options) { var contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo["text/vnd.tiddlywiki"], match; for(var t=0; t