2016-04-14 17:37:05 +00:00
<h1>General search syntax</h1>
<p>Search queries are built of tokens that are separated by spaces. Each token
can be of following form:</p>
2016-03-29 10:34:10 +00:00
<table>
<thead>
<tr>
2016-04-14 17:37:05 +00:00
<th>Syntax</th>
<th>Token type</th>
2016-03-29 10:34:10 +00:00
<th>Description</th>
</tr>
</thead>
2016-04-14 17:37:05 +00:00
<tbody>
<tr>
<td><code><value></code></td>
<td>anonymous tokens</td>
<td>basic filters</td>
</tr>
<tr>
<td><code><key>:<value></code></td>
<td>named tokens</td>
<td>advanced filters</td>
</tr>
<tr>
<td><code>order:<style></code></td>
<td>order tokens</td>
<td>sort results</td>
</tr>
<tr>
<td><code>special:<value></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>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<table>
2016-03-29 10:34:10 +00:00
<tbody>
<tr>
2016-04-14 17:37:05 +00:00
<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>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>1..</code></td>
<td>will show things that are equal to or greater than 1.</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>..4</code></td>
<td>will show things that are equal to at most 4.</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>1..4</code></td>
<td>will show things that are equal to 1, 2, 3 or 4.</td>
2016-03-29 10:34:10 +00:00
</tr>
2016-04-14 17:37:05 +00:00
</tbody>
</table>
<p>Date/time values can be of following form:</p>
<ul>
<li><code>today</code></li>
<li><code>yesterday</code></li>
<li><code><year></code></li>
<li><code><year>-<month></code></li>
<li><code><year>-<month>-<day></code></li>
</ul>
2016-04-14 18:16:05 +00:00
<p>Some fields, such as user names, can take wildcards (<code>*</code>).</p>
2016-04-14 17:37:05 +00:00
<p>All tokens can be negated by prepending them with <code>-</code>.</p>
<p>Order 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>
<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>
<h1 id='post-search-help'>Post search tokens</h1>
<p><strong>Anonymous tokens</strong></p>
<p>Filter posts tagged with given <code><value></code>.</p>
<p><strong>Named tokens</strong></p>
<table>
<tbody>
2016-03-29 10:34:10 +00:00
<tr>
2016-04-14 17:37:05 +00:00
<td><code>id</code></td>
<td>having specific post ID</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>score</code></td>
<td>having given score</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>uploader</code></td>
<td>uploaded by given user</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>comment</code></td>
<td>commented by given user</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>fav</code></td>
<td>favorited by given user</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>fav-count</code></td>
<td>favorited by given number of users</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>comment-count</code></td>
<td>having given number of comments</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>tag-count</code></td>
<td>having given number of tags</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>note-count</code></td>
<td>having given number of annotations</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>feature-count</code></td>
<td>having been featured given number of times</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>date</code></td>
<td>posted at given date</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>file-size</code></td>
<td>having given file size (in bytes)</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>image-width</code></td>
<td>having given image width (where applicable)</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>image-height</code></td>
<td>having given image height (where applicable)</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>image-area</code></td>
<td>having given number of pixels (image width * image height)</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>type</code></td>
<td>given type of posts (<code><value></code> can be either <code>image</code>, <code>flash</code>/<code>swf</code>, <code>youtube</code>/<code>yt</code>, <code>video</code> or <code>animation</code>)</td>
2016-03-29 10:34:10 +00:00
</tr>
2016-04-14 17:37:05 +00:00
</tbody>
</table>
<p><strong>Order tokens</strong></p>
<table>
<tbody>
2016-03-29 10:34:10 +00:00
<tr>
2016-04-14 17:37:05 +00:00
<td><code>random</code></td>
<td>as random as it can get</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>id</code></td>
<td>highest to lowest post ID</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>score</code></td>
<td>highest scored</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>fav-count</code></td>
<td>loved by most</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>comment-count</code></td>
<td>most commented first</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>tag-count</code></td>
<td>with most tags</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>note-count</code></td>
<td>with most annotations</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>file-size</code></td>
<td>largest files first</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>image-width</code></td>
<td>widest images first</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>image-height</code></td>
<td>tallest images first</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>image-area</code></td>
<td>largest images first</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>creation-date</code></td>
<td>newest to oldest (pretty much same as <code>id</code>)</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>edit-date</code></td>
<td>like <code>creation-date</code>, only looks at last edit time</td>
2016-03-29 10:34:10 +00:00
</tr>
<tr>
2016-04-14 17:37:05 +00:00
<td><code>fav-date</code></td>
<td>recently added to favorites by anyone</td>
</tr>
<tr>
<td><code>comment-date</code></td>
<td>recently commented by anyone</td>
</tr>
<tr>
<td><code>feature-date</code></td>
<td>recently featured</td>
</tr>
<tr>
<td><code>feature-count</code></td>
<td>most often featured</td>
2016-03-29 10:34:10 +00:00
</tr>
</tbody>
</table>
2016-04-14 17:37:05 +00:00
<p><strong>Special tokens</strong></p>
2016-03-29 10:34:10 +00:00
<table>
2016-04-14 17:37:05 +00:00
<tbody>
2016-03-29 10:34:10 +00:00
<tr>
2016-04-14 17:37:05 +00:00
<td><code>liked</code></td>
<td>posts liked by currently logged in user</td>
2016-03-29 10:34:10 +00:00
</tr>
2016-04-14 17:37:05 +00:00
<tr>
<td><code>disliked</code></td>
<td>posts disliked by currently logged in user</td>
</tr>
<tr>
<td><code>fav</code></td>
<td>posts added to favorites by currently logged in user</td>
</tr>
<tr>
<td><code>tumbleweed</code></td>
<td>posts with score of 0, without comments and without favorites</td>
</tr>
</tbody>
</table>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<h1 id='user-search-help'>User search tokens</h1>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<p><strong>Anonymous tokens</strong></p>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<p>Same as <code>name</code> token.</p>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<p><strong>Named tokens</strong></p>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<table>
<tbody>
<tr>
<td><code>name</code></td>
<td>having given name (doesn't accept wildcards yet)</td>
</tr>
<tr>
<td><code>creation-date</code></td>
<td>registered at given date</td>
</tr>
<tr>
<td><code>creation-time</code></td>
<td>alias of <code>creation-date</code></td>
</tr>
<tr>
<td><code>last-login-date</code>
<td>whose most recent login date matches given date</td>
</tr>
<tr>
<td><code>last-login-time</code>
<td>alias of <code>last-login-date</code>
</tr>
<tr>
<td><code>login-date</code>
<td>alias of <code>last-login-date</code>
</tr>
<tr>
<td><code>login-time</code></td>
<td>alias of <code>last-login-date</code>
</tr>
</tbody>
</table>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<p><strong>Order tokens</strong></p>
2016-03-29 10:34:10 +00:00
2016-04-14 17:37:05 +00:00
<table>
<tbody>
<tr>
<td><code>random</code></td>
<td>as random as it can get</td>
</tr>
<tr>
<td><code>name</code></td>
<td>A to Z</td>
</tr>
<tr>
<td><code>creation-date</code></td>
<td>newest to oldest</td>
</tr>
<tr>
<td><code>creation-time</code></td>
<td>alias of <code>creation-date</code></td>
</tr>
<tr>
<td><code>last-login-date</code></td>
<td>recently active first</td>
</tr>
<tr>
<td><code>last-login-time</code></td>
<td>alias of <code>last-login-date</code></td>
</tr>
<tr>
<td><code>login-date</code></td>
<td>alias of <code>last-login-date</code></td>
</tr>
<tr>
<td><code>login-time</code></td>
<td>alias of <code>last-login-date</code></td>
</tr>
2016-03-29 10:34:10 +00:00
</tbody>
</table>
2016-04-14 17:37:05 +00:00
<p><strong>Special tokens</strong></p>
<p>None.</p>
2016-04-16 18:55:15 +00:00
<h1 id='tag-search-help'>Tag search tokens</h1>
<p><strong>Anonymous tokens</strong></p>
<p>Same as <code>name</code> token.</p>
<p><strong>Named tokens</strong></p>
<table>
<tbody>
<tr>
<td><code>name</code></td>
<td>having given name (accepts wildcards)</td>
</tr>
<tr>
<td><code>category</code></td>
<td>having given category</td>
</tr>
<tr>
<td><code>creation-date</code></td>
<td>created at given date</td>
</tr>
<tr>
<td><code>creation-time</code></td>
<td>alias of <code>creation-date</code></td>
</tr>
<tr>
<td><code>last-edit-date</code></td>
<td>edited at given date</td>
</tr>
<tr>
<td><code>last-edit-time</code></td>
<td>alias of <code>last-edit-date</code></td>
</tr>
<tr>
<td><code>edit-date</code></td>
<td>alias of <code>last-edit-date</code></td>
</tr>
<tr>
<td><code>edit-time</code></td>
<td>alias of <code>last-edit-date</code></td>
</tr>
<tr>
<td><code>usages</code></td>
<td>used in given number of posts</td>
</tr>
<tr>
<td><code>usage-count</code></td>
<td>alias of <code>usages</code></td>
</tr>
<tr>
<td><code>post-count</code></td>
<td>alias of <code>usages</code></td>
</tr>
<tr>
<td><code>suggestion-count</code></td>
<td>with given number of suggestions</td>
</tr>
<tr>
<td><code>implication-count</code></td>
<td>with given number of implications</td>
</tr>
</tbody>
</table>
<p><strong>Order tokens</strong></p>
<table>
<tbody>
<tr>
<td><code>random</code></td>
<td>as random as it can get</td>
</tr>
<tr>
<td><code>name</code></td>
<td>A to Z</td>
</tr>
<tr>
<td><code>category</code></td>
<td>category (A to Z)</td>
</tr>
<tr>
<td><code>creation-date</code></td>
<td>recently created first</td>
</tr>
<tr>
<td><code>creation-time</code></td>
<td>alias of <code>creation-date</code></td>
</tr>
<tr>
<td><code>last-edit-date</code></td>
<td>recently edited first</td>
</tr>
<tr>
<td><code>last-edit-time</code></td>
<td>alias of <code>creation-time</code></td>
</tr>
<tr>
<td><code>edit-date</code></td>
<td>alias of <code>creation-time</code></td>
</tr>
<tr>
<td><code>edit-time</code></td>
<td>alias of <code>creation-time</code></td>
</tr>
<tr>
<td><code>usages</code></td>
<td>used in most posts first</td>
</tr>
<tr>
<td><code>usage-count</code></td>
<td>alias of <code>usages</code></td>
</tr>
<tr>
<td><code>post-count</code></td>
<td>alias of <code>usages</code></td>
</tr>
<tr>
<td><code>suggestion-count</code></td>
<td>with most suggestions first</td>
</tr>
<tr>
<td><code>implication-count</code></td>
<td>with most implications first</td>
</tr>
</tbody>
</table>
<p><strong>Special tokens</strong></p>
<p>None.</p>