Monday, 17 August 2015

SharePoint online - Scenario to Re-index a site or list

Recently I was working with Search on a custom list in SharePoint online where I observed that not all the list items that fulfill a criteria are being returned in search results. Initially, I had created a custom list named "News" with the following fields

- Title
- Teaser
- Description.

I created 2 list items which were picked up by the continuous crawl in SP online and were being fetched properly in search results. Then I realized that I do not have a field that indicates when this news should be published to the user. So I added a new column "Publish Date" to the list, edited the 2 existing items to assign the Publish date and also created 4 new items.

In order to use the publish date field in search, I mapped it to an existing managed property and tried to query these items on a specific criteria for the PUBLISH DATE field using content search webpart. Though all the 6 items were satisfying the criteria, only the 4 NEW items created were being returned by the search. I gave it some time hoping that the SP online full crawl might index the two items, but it did not !

I then remembered the new feature in SharePoint 2013 which allows us to Re-Index a list, library or a site. Thought I would give it a shot. To re-index a list, go to the List Settings -> Advanced Settings  there is an option to re-index the list.

This will fully re-index the entire list. I also came across this article later which explains that re-index is required after changing the managed properties.

No comments:

Post a Comment