# Use Categories

This section describes how to use categories after you have trained and built them.

## Query

You can use categories to search for documents that match the training. Behind the scenes, IDOL Server sends a query action to the content index (data DRE), with the query text set to the category terms and weights (TNW) string, for example, `"CAT~[123] DOG~[234] FISH~[345]"`. Documents that match some of the terms return as results.

The term weights (the numbers in brackets) affect the relevance score of returning documents. IDOL Server gives a relevance boost to documents that contain terms with high weights, and it reduces the relevance for documents that contain a term with a low weight.

You can also add further query terms to the category query, and documents must match both this and the TNW string.

You query for documents that match categories by using the `CategoryQuery` action.

## Suggestion

You can use categories to categorize incoming content, by suggesting which categories are a good fit for the new document or text.

In this case, Category sends a query to the AgentStore, with the query text set to the content of the document, or plain text. The AgentStore returns the categories that the document falls into. You can set a threshold, to avoid returning categories that only weakly match the document.

You can tag the document with the categories that it matches. This is a useful part of pre-index processing. It allows IDOL Server to file the document appropriately, or route it for further processing.

You query for categories that match a document or text by using the `CategorySuggestFromDocument` or `CategorySuggestFromText` actions.

_FT_HTML5_bannerTitle.htm