[[query-dsl-term-filter]]
=== Term Filter

Filters documents that have fields that contain a term (*not analyzed*).
Similar to <<query-dsl-term-query,term query>>,
except that it acts as a filter. Can be placed within queries that
accept a filter, for example:

[source,js]
--------------------------------------------------
{
    "constant_score" : {
        "filter" : {
            "term" : { "user" : "kimchy"}
        }
    }
}
--------------------------------------------------

[float]
==== Caching

The result of the filter is automatically cached by default. The
`_cache` can be set to `false` to turn it off. Here is an example:

[source,js]
--------------------------------------------------
{
    "constant_score" : {
        "filter" : {
            "term" : { 
                "user" : "kimchy",
                "_cache" : false
            }
        }
    }
}
--------------------------------------------------
