<p>If any of this is confusing, a simpler guide is <ahref="https://github.com/Zweibach/text/blob/master/Hydrus/Hydrus%20Help%20Docs/00_tableOfContents.md">here</a>, and some video guides are <ahref="https://github.com/CuddleBear92/Hydrus-guides">here</a>!</p>
<p>So, you have stored some media in your database. Everything is hashed and cached. You can search by inbox and resolution and size and so on, but if you really want to find what we are looking for, you will have to use <i>tags</i>.</p>
<p><ahref="faq.html#tags">FAQ: what is a tag?</a></p>
<p>Your client starts with one local tags service, called 'my tags', which keeps all of its file->tag mappings in your client's database where only you can see them. It is a good place to practise. So, select a file and press F3:</p>
<p>The autocomplete dropdown in the manage tags dialog works very like the one in a normal search page--you type part of a tag, and matching results will appear below. You select the tag you want with the arrow keys and hit enter. Since your 'my tags' service doesn't have any tags in it yet, you won't get any results here except the exact match of what you typed. If you want to remove a tag, enter the exact same thing again or double-click it in the box above.</p>
<p>Prefixing a tag with a category and a colon will create a <i>namespaced</i> tag. This helps inform the software and other users about what the tag is. Examples of namespaced tags are:</p>
<ul>
<li>character:batman</li>
<li>series:street fighter</li>
<li>person:jennifer lawrence</li>
<li>title:vitruvian man</li>
</ul>
<p>The client is set up to draw common namespaces in different colours, just like boorus do. You can change these colours in the options.</p>
<p>Searches find files that match every search 'predicate' in the list (it is an <b>AND</b> search), which makes it difficult to search for files that include one <b>OR</b> another tag. More recently, simple OR search support was added. All you have to do is hold down Shift when you enter/double-click a tag in the autocomplete entry area. Instead of sending the tag up to the active search list up top, it will instead start an under-construction 'OR chain' in the tag results below:</p>
<p><imgsrc="or_under_construction.png"/></p>
<p>You can keep searching for and entering new tags. Holding down Shift on new tags will extend the OR chain, and entering them as normal will 'cap' the chain and send it to the complete and active search predicates above.</p>
<p><imgsrc="or_done.png"/></p>
<p>Any file that has one or more of those OR sub-tags will match.</p>
<p>If you enter an OR tag incorrectly, you can either cancel or 'rewind' the under-construction search predicate with these new buttons that will appear:</p>
<p><imgsrc="or_buttons.png"/></p>
<p>You can also cancel an under-construction OR by hitting Esc on an empty input. You can add any sort of search term to an OR search predicate, including system predicates. Some unusual sub-predicates (typically a '-tag', or a very broad system predicate) can run very slowly, but they will run much faster if you include non-OR search predicates in the search:</p>
<p><imgsrc="or_mixed.png"/></p>
<p>This search will return all files that have the tag 'fanfic' and one or more of 'medium:text', a positive value for the like/dislike rating 'read later', or PDF mime.</p>
<p>Tag repos store many file->tag relationships. Anyone who has an access key to the repository can sync with it and hence download all these relationships. If any of their own files match up, they will get those tags. Access keys will also usually have permission to upload new tags and ask for incorrect existing ones to be deleted.</p>
<p>Anyone can run a tag repository, but it is a bit complicated for new users. I ran a public tag repository for a long time, and now this large central store is run by users. It has hundreds of millions of tags and is free to access and contribute to.</p>
<p>To connect with it, please check <ahref="access_keys.html">here</a>.</h3>
<p>If you add it, your client will download updates from the repository over time and, usually when it is idle or shutting down, 'process' them into its database until it is fully synchronised. The processing step is CPU and HDD heavy, and you can customise when it happens in <i>file->options->maintenance and processing</i>. As the repository synchronises, you should see some new tags appear, particularly on famous files that lots of people have.</p>
<p><b>Tags are rich, cpu-intensive metadata. The Public Tag Repository has hundreds of millions of mappings, and your client will eventually download and index them all. Be aware that the PTR has been growing since 2011 and now has hundreds of millions of mappings. As of 2020-03, it requires about 4GB of bandwidth and file storage, and your database itself will grow by 25GB! It will take <i>hours</i> of total processing time to fully synchronise. <spanclass="warning">Because of mechanical drive latency, HDDs are often too slow to process hundreds of millions of tags in reasonable time. Syncing with large repositories is only recommended <ahref="database_migration.html">if your hydrus db is on an SSD</a>.</span> Even then, it is best left to work on this in small pieces in the background, either during idle time or shutdown time, so unless you are an advanced user, just leave it to download and process on its own--it usually takes a couple of weeks to quietly catch up.</b></p>
<p>Your new service should now be listed on the left of the manage tags dialog. Adding tags to a repository works very similarly to the 'my tags' service except hitting 'apply' will not immediately confirm your changes--it will put them in a queue to be uploaded. These 'pending' tags will be counted with a plus '+' or minus '-' sign:</p>
<p>Notice that a 'pending' menu has appeared on the main window. This lets you start the upload when you are ready and happy with everything that you have queued.</p>
<p>When you upload your pending tags, they will commit and look to you like any other tag. The tag repository will anonymously bundle them into the next update, which everyone else will download in a day or so. They will see your tags just like you saw theirs.</p>
<p>If you attempt to remove a tag that has been uploaded, you may be prompted to give a reason, creating a petition that a janitor for the repository will review.</p>
<p>I recommend you not spam tags to the public tag repo until you get a rough feel for the <ahref="https://github.com/CuddleBear92/Hydrus-Presets-and-Scripts/blob/master/tag%20guidelines">guidelines</a>, and my original <ahref="tagging_schema.html">tag schema</a> thoughts, or just lurk until you get the idea. It roughly follows what you will see on a typical booru. The general rule is to only add factual tags--no subjective opinion.</p>
<p>You can connect to more than one tag repository if you like. When you are in the <i>manage tags</i> dialog, pressing the up or down arrow keys on an empty input switches between your services.</p>