2

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.

  • 4
    • What are the "Old managed properties"? When you look at the attributes of the MPCountry property, is it Queryable? Commented Nov 27, 2014 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
      Commented Nov 27, 2014 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. Commented Nov 27, 2014 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
      Commented Nov 27, 2014 at 14:40

    1 Answer 1

    4

    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
    
    4
    • 1
      Do you know what? It worked. Thanks allot!
      – Arnold
      Commented Nov 28, 2014 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 ? Commented Jan 13, 2017 at 11:25
    • @NigelPrice I would keep them just to make sure you don't break anything - no expert on this. Commented Jan 13, 2017 at 15:37
    • Had the same problem: new custom managed property was completely ignored even after a full crawl (message in ULS was: "Didn't find property with name XXX in schema id 0 for tenant XXX site collection XXX". What did the trick was a config cache cleaning (as per this answer) + "re-index site" from site settings + incremental crawl.
      – Evariste
      Commented Feb 15, 2021 at 11:13

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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