1

I’m writing a Content Enrichment Web Service that is used as an extension to the Content Processing component in my Search Service Application. The web service runs as expected at localhost. I have no problem adding it to my Search Service Application through PowerShell (when all crawl activity are idle).

When running the full crawl I get readable errors in the ULS, but am unable to locate the field mentioned. Searching term store, site columns and the TaxonomyHiddenList gives no clue either. I want to locate the field and destroy it forever. The question is where the following field lives?

Error: [ContentEnrichment] The field name 'owstaxIdNøkkelord' is not valid.

ULS log error

11/21/2013 12:47:23.07  NodeRunnerContent1-e7775856-eb2 (0x0D18)    0x239C  Search                          Content Processing              ai89o   High        
ContentIntegrationEngine : Evaluation of flow Microsoft.CrawlerFlow failed. 
Microsoft.Ceres.Evaluation.DataModel.EvaluationException: Operator graph Microsoft.CrawlerFlow failed validation   
Status: Error, Messages:   
[Microsoft.Ceres.ContentEngine.Operators.BuiltIn.SubFlow.SubFlow(
subFlowName="Microsoft.CrawlerContentEnrichmentSubFlow",
subFlowInputs=Null,
subFlowOutputs=Null,
inputOutputMap={},
label="ContentEnrichment",
errorTarget=Null,
additionalSuccessors=Null)] 
Error: [ContentEnrichment] The field name 'owstaxIdNøkkelord' is not valid. 
Field names can only contain English letters, digits, the underline character '_', and the punctuation mark '.'. 
The name must start with a letter and cannot end with a punctuation mark.  
[Microsoft.Ceres.ContentEngine.Operators.BuiltIn.SubFlow.SubFlow(
subFlowName="Microsoft.CrawlerAlertsDataGenerationSubFlow",
subFlowInputs=Null,
subFlowOutputs=Null,
inputOutputMap={},
label="AlertsDataGenerator",
errorTarget=Null,
additionalSuccessors=Null)] 
Warning: [Alerts.RemoveFieldListBeforeAlerts] 
The field 'FieldList' is marked for removal, but cannot be found in the input.     
at Microsoft.Ceres.ContentEngine.Component.ContentIntegrationEngine.ThrowValidationError(OperatorFlow flow, GraphStatusMessages status)     
at Microsoft.Ceres.ContentEngine.Component.ContentIntegrationEngine.PrepareFlow(OperatorFlow flow, FlowEvaluationConfig flowConfig, CieLogWriter& lw, EvaluationConfig& config, ICallbackManager& callbackManager)     
at Microsoft.Ceres.ContentEngine.Component.ContentIntegrationEngine.ExecuteFlowInternal(OperatorFlow flow, Boolean debug, FlowEvaluationConfig flowConfig, Boolean start, Boolean isNested)     
at Microsoft.Ceres.ContentEngine.Component.ContentIntegrationEngine.ExecuteFlowAndWait(OperatorFlow flow, Boolean debug, FlowEvaluationConfig config)     
at Microsoft.Ceres.ContentEngine.Component.ContentIntegrationEngine.ExecuteFlow(String name, Boolean debug, FlowEvaluationConfig config)

The Web Service source code:

using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Office.Server.Search.ContentProcessingEnrichment;
using Microsoft.Office.Server.Search.ContentProcessingEnrichment.PropertyTypes;

namespace ContentProcessingEnrichmentService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ContentProcessingEnrichmentService" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select ContentProcessingEnrichmentService.svc or ContentProcessingEnrichmentService.svc.cs at the Solution Explorer and start debugging.
    public class ContentProcessingEnrichmentService : IContentProcessingEnrichmentService
    {
        // Defines the name of the managed property 'Filename'.
        private const string FileNameProperty = "Filename";

        // Defines the name of the managed property 'Author'
        private const string AuthorProperty = "Author";

        // Defines the temporary directory where binary data will be stored.
        private const string TempDirectory = @"C:\Temp";

        // Defines the error code for managed properties with an unexpected type.
        private const int UnexpectedType = 1;

        // Defines the error code for encountering unexpected exceptions.
        private const int UnexpectedError = 2;

        private readonly ProcessedItem processedItemHolder = new ProcessedItem
        {
            ItemProperties = new List<AbstractProperty>()
        };

        public ProcessedItem ProcessItem(Item item)
        {
            processedItemHolder.ErrorCode = 0;
            processedItemHolder.ItemProperties.Clear();
            try
            {
                // Iterate over each property received and locate the two properties we
                // configured the system to send.
                foreach (var property in item.ItemProperties)
                {
                    // Check if this is the author property.
                    if (property.Name.Equals(AuthorProperty, StringComparison.Ordinal))
                    {
                        var author = property as Property<List<string>>;
                        if (author == null)
                        {
                            // The author property was not of the expected type.
                            // Update the error code and return. 
                            processedItemHolder.ErrorCode = UnexpectedType;
                            return processedItemHolder;
                        }

                        // Adding a new author to the list so it will become searchable.      
                        author.Value.Add("ExampleService");
                        processedItemHolder.ItemProperties.Add(author);
                    }
                    else if (property.Name.Equals(FileNameProperty, StringComparison.Ordinal))
                    {
                        var filename = property as Property<string>;
                        if (filename == null)
                        {
                            // The file name property was not of the expected type.
                            // Update error code and return.
                            processedItemHolder.ErrorCode = UnexpectedType;
                            return processedItemHolder;
                        }
                        if (!string.IsNullOrEmpty(filename.Value))
                        {
                            var fullFilePath = string.Join(char.ToString(Path.DirectorySeparatorChar), TempDirectory, filename.Value);
                            if (item.RawData != null)
                            {
                                var outputFile = File.Create(fullFilePath);
                                using (var writer = new BinaryWriter(outputFile))
                                {
                                    writer.Write(item.RawData);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                processedItemHolder.ErrorCode = UnexpectedError;
            }
            return processedItemHolder;
        }
    }
}

CEWS running

The PowerShell script adding the Content Enrichment Web Service to the Search Service Application

    # Create and add your CEWS to IIS, before using this

    if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
    {
        Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    }

    $ssa = Get-SPEnterpriseSearchServiceApplication
    $config = New-SPEnterpriseSearchContentEnrichmentConfiguration
    $config.Endpoint = "http://localhost/ContentProcessingEnrichmentService/ContentProcessingEnrichmentService.svc"
    $config.InputProperties = "Author", "Filename"
    $config.OutputProperties = "Author"
    $config.SendRawData = $True
    $config.MaxRawDataSize = 8192
    Set-SPEnterpriseSearchContentEnrichmentConfiguration –SearchApplication $ssa –ContentEnrichmentConfiguration $config

    # To Remove, use this
    #Remove-SPEnterpriseSearchContentEnrichmentConfiguration –SearchApplication $ssa
2

The field seems to be a crawled property owstaxIdNøkkelord that you can delete via Search Service application -> Search Administration -> Query and Results -> Search Schema

You will find crawled properties listed on Search Schema page.

See also how to delete a crawled property

  • 1
    Super! A GUI for finding all of my nowegian letters in the crawled properties(æ Æ ø Ø)! Thanks! This was due to an export/import acticvity. – Benny Skogberg Nov 21 '13 at 14:37
  • 2
    Leave behind some Norwegian cheese instead of corrupted fields :) – Falak Mahmood Nov 21 '13 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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