We are facing a very unusual issue at one of our customers. Newly created managed properties are not being filled with values.

The scenario:

  • SharePoint 2013
  • the Search Service Application has been in action for about 1.5 years and was working well
  • we need a new refiner in one of the search centers, therefore we went through the following steps:

    1. create a new site column (ex: Country, single line of text)
    2. add it to a document library
    3. upload a sample document to the library and fill in values for all fields (value for Country: Canada)
    4. start an incremental crawl (this automatically creates a crawled and a managed property, let's assume that the managed property is called: MPCountry)
    5. after making sure, that the managed property is properly mapped to the crawled property, we started a full crawl (this should ensure, that the newly created managed property contain the values from documents metadata)

    The result:

    By searching for Canada, the sample document can be found!
    By searching for MPCountry:Canada no document can be found. Furthermore, a single log entry can be found in ULS stating that the managed property cannot be found in the search service application.

    Other interesting findings:

    Old managed properties can still be used to filter for documents.
    Old managed properties are filled with values from newly uploaded documents.

    • What are the "Old managed properties"? When you look at the attributes of the MPCountry property, is it Queryable? – Matthew McDermott Nov 27 '14 at 13:03
    • By "old managed properties" I mean those properties, which we have added in the past. Of course, MPCountry is queriable, searchable, retreivable, etc. (all relevant checkboxes are set). – Arnold Nov 27 '14 at 13:04
    • OK, is the Site Column/Managed Property declared in the same site collection as the Search Center? Or are they two separate site collections? I have been meaning to test this. – Matthew McDermott Nov 27 '14 at 13:18
    • I've tested both cases. I've created site columns within a search center and separate site collections, sadly makes no difference. – Arnold Nov 27 '14 at 14:40
    up vote 3 down vote accepted

    I have encountered issues with this recently myself on at a Yammer question. You can try to clear the SharePoint Config Cache to resolve it. See http://blogs.technet.com/b/sp/archive/2013/05/29/clear-sharepoint-config-cache-with-powershell.aspx for code on this.

    Code copied from the above post:

    Add-PSSnapin -Name Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue
    
    Stop-Service SPTimerV4
    $folders = Get-ChildItem C:\ProgramData\Microsoft\SharePoint\Config 
    foreach ($folder in $folders)
        {
        $items = Get-ChildItem $folder.FullName -Recurse
        foreach ($item in $items)
            {
                if ($item.Name.ToLower() -eq "cache.ini")
                    {
                        $cachefolder = $folder.FullName
                    }
    
            }
        }
    $cachefolderitems = Get-ChildItem $cachefolder -Recurse
        foreach ($cachefolderitem in $cachefolderitems)
            {
                if ($cachefolderitem -like "*.xml")
                    {
                       $cachefolderitem.Delete()
                    }
    
            }
    
    $a = Get-Content  $cachefolder\cache.ini
    $a  = 1
    Set-Content $a -Path $cachefolder\cache.ini
    
    read-host "Do this on all your SharePoint Servers - and THEN press ENTER" 
    start-Service SPTimerV4
    
    • 1
      Do you know what? It worked. Thanks allot! – Arnold Nov 28 '14 at 13:11
    • I have a number of folders in ProgramData/Microsoft/SharePoint/Config with Guids as their names. only one has cache.ini in it. Can I delete the rest ? – Nigel Price Jan 13 '17 at 11:25
    • @NigelPrice I would keep them just to make sure you don't break anything - no expert on this. – Mikael Svenson Jan 13 '17 at 15:37

    Your Answer

    By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.