private void AddComputedIndexField(IComputedIndexField computedIndexField, object fieldValue) { AzureSearchFieldConfiguration fieldSettings = this.Index.Configuration.FieldMap.GetFieldConfiguration(computedIndexField.FieldName) as AzureSearchFieldConfiguration; if (fieldValue is IEnumerable && !(fieldValue is string)) { foreach (object fieldValue1 in fieldValue as IEnumerable) { if (fieldSettings != null) { this.AddField(computedIndexField.FieldName, fieldValue1, fieldSettings, 0.0f); } else { this.AddField(computedIndexField.FieldName, fieldValue1, false); } } } else if (fieldSettings != null) { this.AddField(computedIndexField.FieldName, fieldValue, fieldSettings, 0.0f); } else { this.AddField(computedIndexField.FieldName, fieldValue, false); } }
protected void AddMediaItemContentExtractorByFileExtension(string extension, IComputedIndexField computedField) { Assert.ArgumentNotNull(extension, "extension"); Assert.ArgumentNotNull(computedField, "computedField"); this.extensionComputedFields[extension] = computedField; }
protected void AddMediaItemContentExtractorByMimeType(string mimeType, IComputedIndexField computedField) { Assert.ArgumentNotNull(mimeType, "mimeType"); Assert.ArgumentNotNull(computedField, "computedField"); this.mimeTypeComputedFields[mimeType] = computedField; }
protected void AddFallbackMediaItemContentExtractor(IComputedIndexField computedField) { Assert.ArgumentNotNull(computedField, "computedField"); this.fallbackComputedIndexFields.Insert(0, computedField); }