Azure.ContentSearch.AzureProvider.AzureIndexOperations.GetIndexData C# (CSharp) Method

GetIndexData() private method

private GetIndexData ( IIndexable indexable, IProviderUpdateContext context ) : IndexData
indexable IIndexable
context IProviderUpdateContext
return Jarstan.ContentSearch.AzureProvider.IndexData
        internal IndexData GetIndexData(IIndexable indexable, IProviderUpdateContext context)
        {
            Assert.ArgumentNotNull(indexable, "indexable");
            Assert.ArgumentNotNull(context, "context");
            Assert.Required((index.Configuration.DocumentOptions as AzureDocumentBuilderOptions), "IDocumentBuilderOptions of wrong type for this crawler");
            AzureDocumentBuilder documentBuilder = (AzureDocumentBuilder)ReflectionUtil.CreateObject(context.Index.Configuration.DocumentBuilderType, new object[2]
            {
                indexable,
                context
            });
            if (documentBuilder == null)
            {
                CrawlingLog.Log.Error("Unable to create document builder (" + context.Index.Configuration.DocumentBuilderType + "). Please check your configuration. We will fallback to the default for now.", (Exception)null);
                documentBuilder = new AzureDocumentBuilder(indexable, context);
            }
            documentBuilder.AddSpecialFields();
            documentBuilder.AddItemFields();
            documentBuilder.AddComputedIndexFields();
            documentBuilder.AddBoost();
            var indexData = new IndexData(index, indexable, documentBuilder);
            index.AzureSchema.AddAzureIndexFields(indexData.Fields.Where(f => f.Name != indexData.UpdateTerm.Name).ToList());
            index.AzureSchema.BuildAzureIndexSchema(indexData.UpdateTerm, indexData.FullUpdateTerm);
            return indexData;
        }