summaryrefslogtreecommitdiff
path: root/client/html/help_search_general.tpl
blob: 6a5cfd587f15446f8316be8e83333020298f78a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<p>Search queries are built of tokens that are separated by spaces. Each token
can be of following form:</p>

<table>
    <thead>
        <tr>
            <th>Syntax</th>
            <th>Token type</th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><code>&lt;value&gt;</code></td>
            <td>anonymous tokens</td>
            <td>used for basic filters</td>
        </tr>
        <tr>
            <td><code>&lt;key&gt;:&lt;value&gt;</code></td>
            <td>named tokens</td>
            <td>used for advanced filters</td>
        </tr>
        <tr>
            <td><code>sort:&lt;style&gt;</code></td>
            <td>sort style tokens</td>
            <td>used to sort the results</td>
        </tr>
        <tr>
            <td><code>special:&lt;value&gt;</code></td>
            <td>special tokens</td>
            <td>filters usually tied to the logged in user</td>
        </tr>
    </tbody>
</table>

<p>Most of anonymous and named tokens support ranged and composite values that
take following form:</p>

<table>
    <tbody>
        <tr>
            <td><code>a,b,c</code></td>
            <td>will show things that satisfy either <code>a</code>,
            <code>b</code> or <code>c</code>.</td>
        </tr>
        <tr>
            <td><code>1..</code></td>
            <td>will show things that are equal to or greater than 1.</td>
        </tr>
        <tr>
            <td><code>..4</code></td>
            <td>will show things that are equal to at most 4.</td>
        </tr>
        <tr>
            <td><code>1..4</code></td>
            <td>will show things that are equal to 1, 2, 3 or 4.</td>
        </tr>
    </tbody>
</table>

<p>Ranged values can be also supplied by appending <code>-min</code> or
<code>-max</code> to the key, for example like this:
<code>score-min:1</code>.</p>

<p>Date/time values can be of following form:</p>

<ul>
    <li><code>today</code></li>
    <li><code>yesterday</code></li>
    <li><code>&lt;year&gt;</code></li>
    <li><code>&lt;year&gt;-&lt;month&gt;</code></li>
    <li><code>&lt;year&gt;-&lt;month&gt;-&lt;day&gt;</code></li>
</ul>

<p>Some fields, such as user names, can take wildcards (<code>*</code>).</p>

<p>All tokens can be negated by prepending them with <code>-</code>.</p>

<p>Sort style token values can be appended with <code>,asc</code> or
<code>,desc</code> to control the sort direction, which can be also controlled
by negating the whole token.</p>

<p>You can escape special characters such as <code>:</code> and <code>-</code>
by prepending them with a backslash: <code>\\</code>.</p>

<h1>Example</h1>

<p>Searching for posts with following query:</p>

<pre><code>sea -fav-count:8.. type:swf uploader:Pirate</code></pre>

<p>will show flash files tagged as sea, that were liked by seven people at
most, uploaded by user Pirate.</p>

<p>Searching for posts with <code>re:zero</code> will show an error message
about unknown named token.</p>

<p>Searching for posts with <code>re\:zero</code> will show posts tagged with
<code>re:zero</code>.</p>