mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-28 20:12:41 +00:00
![Mario Pietsch](/assets/img/avatar_default.png)
* Improve Filter Syntax documentaion / navigation * update links and missing diagrams * rename legacy prefix to shortcut prefix * Update editions/tw5.com/tiddlers/filters/Filter Operators.tid Co-authored-by: yaisog <m@rcuswinter.de> * Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid Co-authored-by: yaisog <m@rcuswinter.de> * Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid Co-authored-by: yaisog <m@rcuswinter.de> * Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid Co-authored-by: yaisog <m@rcuswinter.de> * Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid Co-authored-by: yaisog <m@rcuswinter.de> * Update editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid Co-authored-by: yaisog <m@rcuswinter.de> * Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid Co-authored-by: yaisog <m@rcuswinter.de> * add most changes a suggested by yaisog * fix copy / paste from-version * replace operand with parameter in the docs * fix typo * fix typos and improve railroad diagrams consistency * move "new from version" info for filter run prefixes below the table * fix typo transclusion and substitution * Move Filters tiddler to the top level in the TOC * wip-breadcrumbs * breadcrumbs & breadcrumbsList macro final * remove files that do not belong to this PR * restore release banner * add simple / story mode to breadcrumbs * .breadcrumbs macro update comments * new breadcrumbs CSS, woks with small screens * make CSS configurable using hidden-settings * improve CSS fro small screens * remove the initial: recursiveParentTag macro * improve location info for breadcrumbs nav. add "alt-text" for Edge ::after element * breadcrumbs add mode=field * bc add initial docs * breadcrumbsField will also respect the story ordering * add configurable global filterMode setting * improve arrow CSS for browser zooming * add bc links use bc-caption if caption field is non-empty * breadcrumbs improve comments * breadcrumbs aria-lable uses caption if there is one * breadcrumbs improve documentation * breadcrumbs improve docs for sort param * fix showArrows docs * remove .bc-link aria-label .. it's not needed if caption is resolved properly * use subfilter instead of enlist to evaluate the "excluded" variable. Be consistent with toc-macros * remove breadcrumbs macros - they have their own PR now * resolve conflict * add back doc-macros tiddler * integrate :then filter run prefix * remove .breadcrumbs macros and their config tiddlers * fix typos as requested --------- Co-authored-by: yaisog <m@rcuswinter.de>
47 lines
3.2 KiB
Plaintext
47 lines
3.2 KiB
Plaintext
caption: search
|
|
created: 20140410103123179
|
|
modified: 20230711084359603
|
|
op-input: a [[selection of titles|Title Selection]]
|
|
op-neg-output: those input tiddlers in which <<.em not>> all of the search terms can be found
|
|
op-output: those input tiddlers in which <<.em all>> of the search terms can be found in the value of field <<.place F>>
|
|
op-parameter: one or more search terms, separated by spaces, or a literal search string
|
|
op-purpose: filter the input by searching tiddler content
|
|
op-suffix: the <<.op search>> operator uses a rich suffix, see below for details
|
|
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]]
|
|
title: search Operator
|
|
type: text/vnd.tiddlywiki
|
|
|
|
<<.from-version "5.1.18">> The search filter operator was significantly enhanced in 5.1.18. Earlier versions do not support the extended syntax and therefore do not permit searching multiple fields, or the ''literal'' or ''casesensitive'' options.
|
|
|
|
The <<.op search>> operator uses an extended syntax that permits multiple fields and flags to be passed:
|
|
|
|
```
|
|
[search:<field list>:<flag list>[<parameter>]]
|
|
```
|
|
|
|
* ''field list'': a comma delimited list of field names to restrict the search
|
|
** defaults to <<.field tags>>, <<.field text>> and <<.field title>> if blank
|
|
** an asterisk `*` instead of the field list causes the search to be performed across all fields available on each tiddler
|
|
** preceding the list with a minus sign `-` reverses the order so that the search is performed on all fields except the listed fields
|
|
* ''flag list'': a comma delimited list of flags (defaults to `words` if blank)
|
|
* ''parameter'': filter parameter
|
|
|
|
This example searches the fields <<.field title>> and <<.field caption>> for a case-sensitive match for the literal string <<.op-word "The first">>:
|
|
|
|
```
|
|
[search:title,caption:literal,casesensitive[The first]]
|
|
```
|
|
|
|
The available flags are:
|
|
|
|
* Search mode - the first to be set of the following flags determines the type of search that is performed:
|
|
** ''literal'': considers the search string to be a literal string, and requires an exact match
|
|
** ''whitespace'': considers the search string to be a literal string, but will consider all runs of whitespace to be equivalent to a single space. Thus `A B` matches `A B`
|
|
** ''regexp'': treats the search string as a regular expression. Note that the ''regexp'' option obviates the need for the older <<.olink regexp>> operator.
|
|
** ''words'': (the default) treats the search string as a list of tokens separated by whitespace, and matches if ''all of the tokens'' appear in the string (regardless of ordering and whether there is other text in between)
|
|
** ''some'': <<.from-version "5.2.2">> treats the search string as a list of tokens separated by whitespace, and matches if ''at least one'' of the tokens appear in the string
|
|
* ''casesensitive'': if present, this flag forces a case-sensitive match, where upper and lower case letters are considered different. By default, upper and lower case letters are considered identical for matching purposes.
|
|
* ''anchored'': <<.from-version "5.1.20">> anchors the search to the start of the string (applies to ''whitespace'', ''literal'' and ''words'' modes)
|
|
|
|
<<.operator-examples "search">>
|