# Searching file contents

By default, a query searches both the file path and the content. You can
restrict your search to just the contents of a file by using the
[`content`](https://developers.google.com/code-search/reference#filters) filter. For example, the following query looks
for the term `main` in the contents of all Java files. It does not search for
instances where a path contains the term `main`.

    lang:java content:main