How do I index columns in workspaces with more than 5 000 documents?

Documents in workspaces with more than 5 000 documents (SharePoint’s list view threshold), cannot be sorted unless these columns are first indexed. A good approach, when you hit this SharePoint limitation, is to either decrease the number of documents in the workspace by deleting old documents that maybe are not needed anymore or by moving documents in the workspace to other workspaces, e.g. archive workspaces.

If you still need to have more than 5 000 documents in the workspace, you probably should index some columns, at least the ones that that you want to be able to filter and sort on. By default the “Modified” column is indexed. There are a few caveats though as all types of columns cannot be indexed. These are MetaShare’s supported column types that can be indexed:

  1. Single line of text columns
  2. Date columns
  3. Yes/No (check box) columns
  4. Number columns
  5. Choice columns (if they do not allow multiple values)
  6. Person or Group columns (if they do not allow multiple values)
  7. Managed Metadata columns (if they do not allow multiple values)

These columns cannot be indexed:

  1. The standard “File name” column
  2. The standard “File type” column
  3. Multiple lines of text columns
  4. Choice columns (if they allow multiple values)
  5. Person or Group columns (if they allow multiple values)
  6. Managed Metadata columns (if they allow multiple values)

Documents can therefore not be sorted on or filtered on by these columns, unless you first narrow down the number of documents to less than 5 000 documents, by applying a filter on any of the indexed columns.

You can add indexes on up to 20 columns on a document library. It’s however recommended that you only add indexes to the most commonly used columns as indexes add overhead to the data and therefore decrease performance. Once you have indexed a column, you will be able to filter on its values and also sort on the column. Follow these steps to create an index in a document library:

  1. Open the workspace’s SharePoint site.
  2. Open the document library’s settings by clicking on “Site contents” on the left navigation, then clicking on the ellipsis (three vertical dots) and selecting the “Settings” option:
    Open the document library's settings
  3. Under the “Columns” section, click on the “Indexed columns” link:
    Click on the "Indexed columns" link
  4. On the Indexed columns page, click on the “Create a new index” link:
    Click on the "Create a new index" link
  5. Select the column that you want to index, in the drop-down for the “Primary Column” and click on the “Create” button (no “Secondary Column” should be selected):
    Select the column that you want to index
  6. Do step 4 and 5 above for the rest of the columns that you want to index. In general we would recommend to index these columns:
    1. Checked Out To (to be able to receive tasks for checked out documents)
    2. Content type
    3. Created
    4. Created By
    5. Modified
    6. Modified By
    7. Any custom column that you would like to filter on or sort on