Beispiel #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);
                }
            }
Beispiel #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);
                }
            }
Beispiel #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));
                }
            }
Beispiel #4
0
 public DeferedDeleteIndex(ElasticSearchExamineComponent examineComponent, int id, bool keepIfUnpublished)
 {
     _examineComponent = examineComponent;
     _id = id;
     _keepIfUnpublished = keepIfUnpublished;
 }
Beispiel #5
0
 public DeferedReIndexForMember(ElasticSearchExamineComponent examineComponent, IMember member)
 {
     _examineComponent = examineComponent;
     _member           = member;
 }
Beispiel #6
0
 public DeferedReIndexForMedia(ElasticSearchExamineComponent examineComponent, IMedia media, bool isPublished)
 {
     _examineComponent = examineComponent;
     _media            = media;
     _isPublished      = isPublished;
 }
Beispiel #7
0
 public DeferedReIndexForContent(ElasticSearchExamineComponent examineComponent, IContent content, bool isPublished)
 {
     _examineComponent = examineComponent;
     _content          = content;
     _isPublished      = isPublished;
 }