29. Computer instructions stored on a computer-readable storage medium, the computer instructions configured to cause one or more computers to perform operations 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.
29. Computer instructions stored on a computer-readable storage medium, the computer instructions configured to cause one or more computers to perform operations 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. 33. The computer instructions of claim 29 , wherein determining the filter size includes: generating a first data structure wherein each entry corresponds to a count of URL patterns; generating a second data structure wherein each entry includes a non-zero length of at least one of the one or more URL patterns; and calculating a value of an offset error for a set of offsets in the one or more URL patterns based on the first data structure and the second data structure.