public void Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) { var data = BuildDataToIndex(context, indexable); if (data == null) return; if (data.IsEmpty) CrawlingLog.Log.Warn(string.Format("AzureIndexOperations.Update(): IndexVersion produced a NULL doc for UniqueId {0}. Skipping.", indexable.UniqueId), null); var document = data.BuildDocument(); LogIndexOperation(() => string.Format("Updating indexable UniqueId:{0}, Culture:{1}, DataSource:{2}, Index:{3}", indexable.UniqueId, indexable.Culture, indexable.DataSource, context.Index.Name), data, document); context.UpdateDocument(document, data.UpdateTerm, data.Culture != null ? new CultureExecutionContext(data.Culture) : null); }
public void Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) { var doc = GetAzureSearchItem(indexable); //if (doc == null) //{ // Event.RaiseEvent("indexing:excludedfromindex", new object[] { index.Name, indexable.Id }); // return; //} context.UpdateDocument(doc, null); }
public void Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) { var doc = GetDocument(indexable, context); //START: post 4 if (doc == null) { Event.RaiseEvent("indexing:excludedfromindex", new object[] { _index.Name, indexable.Id }); return; } //END: post 4 context.UpdateDocument(doc, null, null); }
public void Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) { var data = BuildDataToIndex(context, indexable); if (data == null) { return; } if (data.IsEmpty) { CrawlingLog.Log.Warn(string.Format("AzureIndexOperations.Update(): IndexVersion produced a NULL doc for UniqueId {0}. Skipping.", indexable.UniqueId), null); } var document = data.BuildDocument(); LogIndexOperation(() => string.Format("Updating indexable UniqueId:{0}, Culture:{1}, DataSource:{2}, Index:{3}", indexable.UniqueId, indexable.Culture, indexable.DataSource, context.Index.Name), data, document); context.UpdateDocument(document, data.UpdateTerm, data.Culture != null ? new CultureExecutionContext(data.Culture) : null); }
public void Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) { if (indexable == null) { throw new ArgumentNullException(nameof(indexable)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } CrawlingLog.Log.Debug($"{LogPreffix} {_index.Name} Update {indexable.Id}"); var doc = BuildDataToIndex(context, indexable); if (doc == null) { Event.RaiseEvent("indexing:excludedfromindex", new object[] { context.Index.Name, indexable.Id }); return; } context.UpdateDocument(doc, null, (IExecutionContext)null); }
public virtual void Update(IIndexable indexable, IProviderUpdateContext context, ProviderIndexConfiguration indexConfiguration) { Document document = GetIndexData(indexable, context); if (document == null) { CrawlingLog.Log.Warn( string.Format( "LuceneIndexOperations.Update(): IndexVersion produced a NULL doc for version {0}. Skipping.", indexable.UniqueId)); return; } var updateTerm = new Term("_uniqueid", indexable.UniqueId.Value.ToString()); context.UpdateDocument(document, updateTerm, indexable.Culture != null ? new CultureExecutionContext(indexable.Culture) : null); }