Friday, July 9, 2010

SharePoint Column Filtered Search !

Project Description
SharePoint Column Filtered search provides a filtered view of a SharePoint full-text search. Results are filtered by column values selected at runtime. The web part is configured for one or more libraries and associated columns. The user selects column values for results to match

About Angry Man Software

Angry Man Software is a small software and consulting company based in Sydney, Australia. Its focus is on providing tools, such as this web part, that fill a need. Where possible, we aim to make these tools available as open source. The filtered search web part augments the out-of-the-box search experience by allowing the user to limit results to those that match given columns. It presents the user with choices, rather than ask them to remember what column values have been set in the library.

Sample Screenshot



When a site owner creates a document library, they are encouraged to organize their documents by using columns rather than folders. These columns can be created quickly and provide custom meta-data for the documents. This powerful appproach separates the way in which information is displayed from the way in which it is stored, so that (for example) documents may grouped by first one column, then another to display a tree-view of the information without locking down the structure in which the information is stored. Add to this the ability to sort and filter on any column, and the document library view becomes a very powerful oganizational tool in itself.

The other powerful way in which information in documents is retrieved by the end-user is using the search capabilities of SharePoint. In particular, the simple search box (not the Advanced Search) is powerful in that the search can be Enterprise-wide, restricted to the current site only, or restricted to only the current document library.

However, out-of-the-box (OOTB) there is no simple way to combine these two powerful document management paradigms. Search returns a list of documents, without the option to filter those results based on column values. Or, more correctly, without the site owner going cap-in-hand to the site collection administrator (or the Farm administrator) and requesting that their humble little column (which may only exist in one library on one site) be elevated to the level of an indexed column included in a search scope.

Another frequent occurance is for the user to be looking for a document related to one which he/she knows contains a certain phrase or item of text. The only way to view the document library in which a search hit resides is to paste the document URL into the address bar of the browser and edit it.

Enter SharePoint Column Filtered Search . Once configured, this web part presents the user with a series of columns and within each column a number of possibilities to choose from. The user selects their column values to filter by, then performs a full-text search. The items returned only match the choices made, and the user is shown which columns match their choices as well as the text snippet from the document and, optionally, a link to the document library in which the document resides, so that they can jump to that library and look for associated documents.

How it works

SharePoint Column Filtered Search performs a full-text search within the current site, and filters the results that are presented to the end-user based on the libraries and chosen columns within those libraries that are configured by the site owner (or user with page editing permissions), and the individual column values selected at runtime by the end user.

The selected column values are treated in an intuitive way, with multiple selections within a column interpreted as ANY of these values, but making selections in more than one column meaning that each document returned must find a match in ALL selected columns. Leaving a column unselected means "don't filter based on this column" and is logically equivalent to selecting all options (or would be, if there were no blanks in that column).


When the web part is first added to a page, it must be configured. An informative message (below) tells the site owner that the part requires setup, and provides a link to open the web part editor (the same as "Modify Shared Web Part" in the drop down menu).


When the user opens the web part editor, he/she is presented with a list of available document libraries for that site. Selecting one and clicking the green "Add" arrow moves it from "Available" to "Selected".


Each time a library is added to the "Selected" list, the list of available columns (in the next pair of list boxes) is updated. Only columns which are not part of the library definition are made avilable for filtering.


Below the Library and Column selection area are other options which control how the web part behaves, as follows:


These options are as follows:

  • Table Color: The background color of the table that displays the column choices. This can be entered as a hex value (the default corresponds to the OOTB color scheme in MOSS) or a named color. If a named color is entered it will be used provided a match can be found.

  • Table Style: Four styles are provided and these determine how lines/border are applied to the table. These are as follows:
    • Style1: Border around table, headers underlined
  • Style2: Border around table, header items boxed
  • Style3: No border around table, headers underlined
  • Plain: No lines at all

tip: For a "plain" style that includes underlining or other grid lines, set the background color to "white"

  • Maximum # unique values per column: This is a "sanity" limit in case someone selects a column (e.g. a time/date field) which is unique for every document. Only the selected number of choices are shown.

  • Show link to parent library. Include a link to the library in the results (recommended, but not default)

  • Limit on search items to return: The search actually returns a list of documents which match the search term within the current site and all sub-sites. For large site collections increasing this limit may degrade perfomance. Increase this only if you need to.

Last edited Dec 10 2009 at 2:07 AM by roncresswell, version 13


Want to leave feedback?
Please use

Discussions or

Reviews instead.