I am currently working on an internal search application where users will be able to search within the repository. We have categories and authors for segregating different documents. There can be different filters once I change the tabs as well as shown in image 2. Is it correct to have categories as filters? Also, how do I show filters that appear within categories?
This is a great 2009 article from UX Matters about filtering search, categories and drilling down into those categories are absolutely fine filters when implemented correctly, the biggest takeaway from the article is to make sure your users always have a way to get back.
My recommendation: NO, do not present categories as filters.
Rather, to solve this problem, I recommend my clients to make two main result templates, based on the market leader's (google.com's) behaviour:
- One Main results template where categories are presented as group results. This template is without filters.
- One Category results template where results within a category are represented with filters.
This also solves your second question: How to show filters that only appear within certain categories. The answer is to wait until the user has clicked a group, thereby informing the service what category she is interested in. This, again, is a design pattern derived from google.com.
If you do multiple test searches on google.com (1, 2, 3) you will oftentimes see that on the first search results page, results from one type of source (images, videos, news, tweets, map results, shopping, facts etc. etc.) are represented together in a group. Some refer to these as Google's OneBoxes. The purpose is intuitive disambiguation; to guide the user to the desired repository by way of providing examples, as opposed to forcing them to read labels and try to understand your information architecture.
As part of an open source project I have illustrated template #1 here. Below are three of the suggested group results (OneBoxes). These groups all have potential, individual filters, and these filters are shown only when the particular group is selected, taking the user to template #2.