How do I index columns in workspaces with more than 5000 documents?
Documents in workspaces with more than 5 000 documents (SharePoint’s list view threshold), cannot be filtered or sorted unless these columns are 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:
- Single line of text columns
- Choice columns (only the ones that have single value selection)
- Date and Time columns
- Person or Group columns (only the ones that have single value selection)
- Managed Metadata columns (only the ones that have single value selection)
These columns cannot be indexed:
- File name
- File type
- Multiple value Choice columns
- Multiple value Person or Group columns
- Multiple value Managed Metadata columns
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:
- Open the workspace’s SharePoint site.
- 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:
- Under the “Columns” section, click on the “Indexed columns” link:
- On the Indexed columns page, click on the “Create a new index” link:
- 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):
- Do step 4 and 5 above for the rest of the columns that you want to index.