--- title: "Faceting Drill Down" slug: "faceting-drill-down" updated: 2021-10-14T22:55:30Z published: 2021-10-14T22:55:30Z canonical: "docs.imat.io/faceting-drill-down" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.imat.io/llms.txt > Use this file to discover all available pages before exploring further. # Faceting Drill Down Narrowing the scope of your query can be done by adding the fq parameter to narrow the search. You can use the Boolean syntax for numbers and dates as described in the [Query Syntax Guide](/query-syntax). The reason &facets and &fq parameters are distinct (&facets does not imply &fq) is that an ajax-style client might want to run multiple queries, and generate the attendant counts, without necessarily narrowing the query for each one. Logic that builds a tree-view and lazily expands it when a user clicks, but that maintains counts for levels other than the most expanded one, depends on this sort of behavior. If you only want facet counts, and not any hits, you can use &limit=0 to make the section of your response empty; the facets section is still populated. The fq parameter can be used to help keep track of breadcrumbs, as the fq is reserved for facet selections. When the user drills in, a new item is added to &fq; when the user backs out, that item can be removed. The XML response includes ... anytime &fq is used in the request URL. Here is a sample query that would return 1,000 hits. The counts associated with each bin sum to 1,000 within a particular facet. This is before a user drills into a particular bin to narrow the search. #### Example: Assumes the date is 08/13/2012 ``` https:///search?q=data&facets=lastmodified:range(begin:-2years, end:today, gap:{-7 days, -1 month, -2 years}),contentlength:range(begin:0, end:4G, gap:{50k, 1M, 25M, 100M, 4G}) ``` #### Response: ``` 401 509 0 900 75 25 0 0 ``` Here is the same query and results with the fq parameter added in, narrowing the criteria and effectively drilling in to the original results. #### Example: ``` https:///search?q=data&space=0&facets=lastmodified:range(begin:-2years, end:today, gap:{-7 days, -1 month, -2 years}),contentlength:range(begin:0, end:4G, gap:{50k, 1M, 25M, 100M, 4G})&fq=lastmodified:([2010-08-13 TO 2012-07-13]),contentlength:([0 TO 51200]) ``` #### Response: ``` 401 0 0 401 0 0 0 0 ```