Raven.Database.Storage.IndexDefinitionStorage.ResolveAnalyzers C# (CSharp) 메소드

ResolveAnalyzers() 공개 정적인 메소드

public static ResolveAnalyzers ( Raven.Database.Indexing.IndexDefinition indexDefinition ) : void
indexDefinition Raven.Database.Indexing.IndexDefinition
리턴 void
        public static void ResolveAnalyzers(IndexDefinition indexDefinition)
        {
            // Stick Lucene.Net's namespace to all analyzer aliases that are missing a namespace
            var analyzerNames = (from analyzer in indexDefinition.Analyzers
                                 where analyzer.Value.IndexOf('.') == -1
                                 select analyzer).ToArray();

            // Only do this for analyzer that actually exist; we do this here to be able to throw a correct error later on
            foreach (var a in analyzerNames.Where(a => typeof(StandardAnalyzer).Assembly.GetType("Lucene.Net.Analysis." + a.Value) != null))
            {
                indexDefinition.Analyzers[a.Key] = "Lucene.Net.Analysis." + a.Value;
            }
        }