1. A method executed by one or more computers, the method comprising: receiving a search query, the search query including a query label; identifying, from a data store, one or more uniform resource locator (URL) patterns, each of the one or more URL patterns including a component of a URL and at least one of a wildcard or a regular expression, and each of the one or more URL patterns being associated with a label that matches the query label; constructing a filter including: determining a filter size based on a length of the one or more URL patterns and a count of a number of URL patterns having each respective length; and constructing the filter having the filter size; and filtering one or more results of the search query using the filter.