close
TXT (dot) bitprocessor (dot) be TXT (dot) bitprocessor (dot) be
Search
Deleting a SharePoint Library View deletes indexes

A calm wednesday evening at work, browsing around in the SharePoint environment. I decided to create a new View on an existing document library, just to test something. Afterwards, I deleted the View I created earlier and all hell broke loose ! (no, I didn’t delete the default View) First of all, after hitting the “Delete” button, the web page took ages to load. I already knew at that point that something wasn’t right ! But then…

We are using document libraries with custom document properties to link each document to a specific case-file. For that to work, we have a property called “Reference” in every single document that corresponds to the reference of each case file in question. A library filter is applied to show only the documents concerned. This all works very well… until yesterday-evening ! Not a single case was showing it’s linked documents ! What the… Panic… First check : are the documents still there ? Yes… Phieew!

So, what’s up then ? Let’s try to filter on the “Reference” column in the library itself… Oops, not working… What could that be ? I fired up the SQL Server profiler to find out what queries were executed by SharePoint to perform the filtering. After I while I found the answer : it needs a table named “NameValuePair…”. I took a quick look at the table and noticed that there were only a couple of entries, all from documents that had been uploaded after deleting the temporary view I created. I opened the case files that should include the documents that were mentioned in the table and yes, they where there. OK, we found the problem… how to solve it, how to recreate entries for all other documents ?

In fact, the solution itself was very simple : you have to go to the library, open the default view and change the settings of the “Indexed columns”. In my case the column in question was still indexed (checkbox checked) which explained why new items were working, but for some reason, the information for old items was lost. The fix itself was as simple as this : uncheck the option to index the column in question and press OK. Reopen the “Indexed columns” page en now re-check the checkbox and press OK. The page will take a long time to load if you have a lot of documents in your library, but in the end, all indexes get recreated and all was working again !

Thank god that got fixed ! The few hours between the moment this thing broke down and got fixed again, I already got numerous phone calls from users that got stuck because they couldn’t find there documents… SharePoint… You got to love it *kuch*

Some interesting links :

  • Share/Bookmark

Leave A Comment