示例#1
0
 public void Delete(DeletedEntry entry)
 {
     lock (transaction)
     {
         indexer.Delete(entry);
     }
 }
示例#2
0
        public virtual void ReindexDescendants(ContentItem root, bool clearBeforeReindex)
        {
            DoWork(() =>
            {
                if (clearBeforeReindex)
                {
                    indexer.Delete(root.ID);
                }

                root = persister.Get(root.ID);
                indexer.Update(root);
                ReindexChildren(root.ID);
            });
        }
示例#3
0
        public virtual void ReindexDescendants(int rootID, bool clearBeforeReindex)
        {
            Execute(new Work
            {
                Name   = "Reindex descendants of #" + rootID,
                Action = () =>
                {
                    if (clearBeforeReindex)
                    {
                        indexer.Delete(rootID);
                    }

                    Reindex(rootID, true);
                }
            });
        }
        internal static void DeleteFromIndex(ContentReference contentLink)
        {
            if (ContentReference.IsNullOrEmpty(contentLink))
            {
                return;
            }

            EPiIndexer.Delete(contentLink);
        }
        internal static void DeleteFromIndex(object sender, ContentEventArgs e)
        {
            if (e?.ContentLink == null)
            {
                return;
            }

            Logger.Debug($"Raising event DeleteFromIndex for '{e.ContentLink}'");
            EPiIndexer.Delete(e.ContentLink);
        }
 private void DeleteLocal(ContentItem local)
 {
     local.State            = ContentState.Deleted;
     _security.ScopeEnabled = false;
     if (_indexer != null)
     {
         _indexer.Delete(local.ID);
     }
     _persister.Repository.Delete(local); // bypass persister
     _security.ScopeEnabled = true;
 }
示例#7
0
 /// <summary>Delets an item from the index and any descendants.</summary>
 /// <param name="itemID">The id of the item to delete.</param>
 public virtual void Delete(int itemID)
 {
     indexer.Delete(itemID);
 }