Exemplo n.º 1
0
            public static void Execute(ElasticSearchExamineComponent examineComponent, IMember member)
            {
                var valueSet = examineComponent._memberValueSetBuilder.GetValueSets(member).ToList();

                foreach (var index in examineComponent._examineManager.Indexes.OfType <IUmbracoIndex>()
                         //filter the indexers
                         .Where(x => x.EnableDefaultEventHandler))
                {
                    index.IndexItems(valueSet);
                }
            }
Exemplo n.º 2
0
            public static void Execute(ElasticSearchExamineComponent examineComponent, int id, bool keepIfUnpublished)
            {
                var strId = id.ToString(CultureInfo.InvariantCulture);

                foreach (var index in examineComponent._examineManager.Indexes.OfType <IUmbracoIndex>()
                         .Where(x => x.PublishedValuesOnly || !keepIfUnpublished)
                         .Where(x => x.EnableDefaultEventHandler))
                {
                    index.DeleteFromIndex(strId);
                }
            }
Exemplo n.º 3
0
            public static void Execute(ElasticSearchExamineComponent examineComponent, IContent content, bool isPublished)
            {
                foreach (var index in examineComponent._examineManager.Indexes.OfType <IUmbracoIndex>()
                         //filter the indexers
                         .Where(x => isPublished || !x.PublishedValuesOnly)
                         .Where(x => x.EnableDefaultEventHandler))
                {
                    //for content we have a different builder for published vs unpublished
                    var builder = index.PublishedValuesOnly
                        ? examineComponent._publishedContentValueSetBuilder
                        : (IValueSetBuilder <IContent>)examineComponent._contentValueSetBuilder;

                    index.IndexItems(builder.GetValueSets(content));
                }
            }
Exemplo n.º 4
0
 public DeferedDeleteIndex(ElasticSearchExamineComponent examineComponent, int id, bool keepIfUnpublished)
 {
     _examineComponent = examineComponent;
     _id = id;
     _keepIfUnpublished = keepIfUnpublished;
 }
Exemplo n.º 5
0
 public DeferedReIndexForMember(ElasticSearchExamineComponent examineComponent, IMember member)
 {
     _examineComponent = examineComponent;
     _member           = member;
 }
Exemplo n.º 6
0
 public DeferedReIndexForMedia(ElasticSearchExamineComponent examineComponent, IMedia media, bool isPublished)
 {
     _examineComponent = examineComponent;
     _media            = media;
     _isPublished      = isPublished;
 }
Exemplo n.º 7
0
 public DeferedReIndexForContent(ElasticSearchExamineComponent examineComponent, IContent content, bool isPublished)
 {
     _examineComponent = examineComponent;
     _content          = content;
     _isPublished      = isPublished;
 }