diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec index 51d7e3b8d0..35e79d8127 100644 --- a/build/NuSpecs/UmbracoCms.Web.nuspec +++ b/build/NuSpecs/UmbracoCms.Web.nuspec @@ -25,7 +25,7 @@ - + diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index 3464823856..1e89e190c8 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -2744,8 +2744,23 @@ namespace Umbraco.Core.Services.Implement content.CreatorId = userId; content.WriterId = userId; - foreach (var property in blueprint.Properties) - content.SetValue(property.Alias, property.GetValue()); //fixme doesn't take into account variants + var now = DateTime.Now; + var cultures = blueprint.CultureInfos.Any() ? blueprint.CultureInfos.Select(x=>x.Key) : new[] {(string)null}; + foreach (var culture in cultures) + { + foreach (var property in blueprint.Properties) + { + content.SetValue(property.Alias, property.GetValue(culture), culture); + } + + content.Name = blueprint.Name; + if (!string.IsNullOrEmpty(culture)) + { + content.SetCultureInfo(culture, blueprint.GetCultureName(culture), now); + } + } + + return content; } diff --git a/src/Umbraco.Examine/Config/ConfigIndexCriteria.cs b/src/Umbraco.Examine/Config/ConfigIndexCriteria.cs deleted file mode 100644 index de2a5ced36..0000000000 --- a/src/Umbraco.Examine/Config/ConfigIndexCriteria.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Examine; - -namespace Umbraco.Examine.Config -{ - /// - /// a data structure for storing indexing/searching instructions based on config based indexers - /// - public class ConfigIndexCriteria - { - /// - /// Constructor - /// - /// - /// - /// - /// - /// - public ConfigIndexCriteria(IEnumerable standardFields, IEnumerable userFields, IEnumerable includeNodeTypes, IEnumerable excludeNodeTypes, int? parentNodeId) - { - UserFields = userFields.ToList(); - StandardFields = standardFields.ToList(); - IncludeItemTypes = includeNodeTypes; - ExcludeItemTypes = excludeNodeTypes; - ParentNodeId = parentNodeId; - } - - public IEnumerable StandardFields { get; internal set; } - public IEnumerable UserFields { get; internal set; } - - public IEnumerable IncludeItemTypes { get; internal set; } - public IEnumerable ExcludeItemTypes { get; internal set; } - public int? ParentNodeId { get; internal set; } - } -} \ No newline at end of file diff --git a/src/Umbraco.Examine/Config/ConfigIndexField.cs b/src/Umbraco.Examine/Config/ConfigIndexField.cs deleted file mode 100644 index ec9cbf797e..0000000000 --- a/src/Umbraco.Examine/Config/ConfigIndexField.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Examine.Config -{ - /// - /// A configuration item representing a field to index - /// - public sealed class ConfigIndexField : ConfigurationElement - { - [ConfigurationProperty("Name", IsRequired = true)] - public string Name - { - get => (string)this["Name"]; - set => this["Name"] = value; - } - - [ConfigurationProperty("EnableSorting", IsRequired = false)] - public bool EnableSorting - { - get => (bool)this["EnableSorting"]; - set => this["EnableSorting"] = value; - } - - [ConfigurationProperty("Type", IsRequired = false, DefaultValue = "String")] - public string Type - { - get => (string)this["Type"]; - set => this["Type"] = value; - } - - public bool Equals(ConfigIndexField other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return string.Equals(Name, other.Name); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != this.GetType()) return false; - return Equals((ConfigIndexField)obj); - } - - public override int GetHashCode() - { - return Name.GetHashCode(); - } - - public static bool operator ==(ConfigIndexField left, ConfigIndexField right) - { - return Equals(left, right); - } - - public static bool operator !=(ConfigIndexField left, ConfigIndexField right) - { - return !Equals(left, right); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Examine/Config/IndexFieldCollection.cs b/src/Umbraco.Examine/Config/IndexFieldCollection.cs deleted file mode 100644 index 063c157dbe..0000000000 --- a/src/Umbraco.Examine/Config/IndexFieldCollection.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Examine.Config -{ - public sealed class IndexFieldCollection : ConfigurationElementCollection - { - #region Overridden methods to define collection - protected override ConfigurationElement CreateNewElement() - { - return new ConfigIndexField(); - } - protected override object GetElementKey(ConfigurationElement element) - { - ConfigIndexField field = (ConfigIndexField)element; - return field.Name; - } - - public override bool IsReadOnly() - { - return false; - } - #endregion - - /// - /// Adds an index field to the collection - /// - /// - public void Add(ConfigIndexField field) - { - BaseAdd(field, true); - } - - /// - /// Default property for accessing an IndexField definition - /// - /// Field Name - /// - public new ConfigIndexField this[string name] - { - get - { - return (ConfigIndexField)this.BaseGet(name); - } - } - - } -} \ No newline at end of file diff --git a/src/Umbraco.Examine/Config/IndexFieldCollectionExtensions.cs b/src/Umbraco.Examine/Config/IndexFieldCollectionExtensions.cs deleted file mode 100644 index eea117ce05..0000000000 --- a/src/Umbraco.Examine/Config/IndexFieldCollectionExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; - -namespace Umbraco.Examine.Config -{ - public static class IndexFieldCollectionExtensions - { - public static List ToList(this IndexFieldCollection indexes) - { - List fields = new List(); - foreach (ConfigIndexField field in indexes) - fields.Add(field); - return fields; - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Examine/Config/IndexSet.cs b/src/Umbraco.Examine/Config/IndexSet.cs deleted file mode 100644 index 65b1cd5aec..0000000000 --- a/src/Umbraco.Examine/Config/IndexSet.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System.Configuration; -using System.IO; -using System.Web; -using System.Web.Hosting; - -namespace Umbraco.Examine.Config -{ - public sealed class IndexSet : ConfigurationElement - { - - [ConfigurationProperty("SetName", IsRequired = true, IsKey = true)] - public string SetName => (string)this["SetName"]; - - /// - /// When this property is set, the indexing will only index documents that are descendants of this node. - /// - [ConfigurationProperty("IndexParentId", IsRequired = false, IsKey = false)] - public int? IndexParentId - { - get - { - if (this["IndexParentId"] == null) - return null; - - return (int)this["IndexParentId"]; - } - } - - /// - /// The collection of node types to index, if not specified, all node types will be indexed (apart from the ones specified in the ExcludeNodeTypes collection). - /// - [ConfigurationCollection(typeof(IndexFieldCollection))] - [ConfigurationProperty("IncludeNodeTypes", IsDefaultCollection = false, IsRequired = false)] - public IndexFieldCollection IncludeNodeTypes => (IndexFieldCollection)base["IncludeNodeTypes"]; - - /// - /// The collection of node types to not index. If specified, these node types will not be indexed. - /// - [ConfigurationCollection(typeof(IndexFieldCollection))] - [ConfigurationProperty("ExcludeNodeTypes", IsDefaultCollection = false, IsRequired = false)] - public IndexFieldCollection ExcludeNodeTypes => (IndexFieldCollection)base["ExcludeNodeTypes"]; - - /// - /// A collection of user defined umbraco fields to index - /// - /// - /// If this property is not specified, or if it's an empty collection, the default user fields will be all user fields defined in Umbraco - /// - [ConfigurationCollection(typeof(IndexFieldCollection))] - [ConfigurationProperty("IndexUserFields", IsDefaultCollection = false, IsRequired = false)] - public IndexFieldCollection IndexUserFields => (IndexFieldCollection)base["IndexUserFields"]; - - /// - /// The fields umbraco values that will be indexed. i.e. id, nodeTypeAlias, writer, etc... - /// - /// - /// If this is not specified, or if it's an empty collection, the default optins will be specified: - /// - id - /// - version - /// - parentID - /// - level - /// - writerID - /// - creatorID - /// - nodeType - /// - template - /// - sortOrder - /// - createDate - /// - updateDate - /// - nodeName - /// - urlName - /// - writerName - /// - creatorName - /// - nodeTypeAlias - /// - path - /// - [ConfigurationCollection(typeof(IndexFieldCollection))] - [ConfigurationProperty("IndexAttributeFields", IsDefaultCollection = false, IsRequired = false)] - public IndexFieldCollection IndexAttributeFields => (IndexFieldCollection)base["IndexAttributeFields"]; - } -} diff --git a/src/Umbraco.Examine/Config/IndexSetCollection.cs b/src/Umbraco.Examine/Config/IndexSetCollection.cs deleted file mode 100644 index bfce8e4cce..0000000000 --- a/src/Umbraco.Examine/Config/IndexSetCollection.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Configuration; - - -namespace Umbraco.Examine.Config -{ - public sealed class IndexSetCollection : ConfigurationElementCollection - { - #region Overridden methods to define collection - protected override ConfigurationElement CreateNewElement() - { - return new IndexSet(); - } - protected override object GetElementKey(ConfigurationElement element) - { - return ((IndexSet)element).SetName; - } - public override ConfigurationElementCollectionType CollectionType => ConfigurationElementCollectionType.BasicMap; - protected override string ElementName => "IndexSet"; - - #endregion - - /// - /// Default property for accessing Image Sets - /// - /// - /// - public new IndexSet this[string setName] => (IndexSet)this.BaseGet(setName); - } -} \ No newline at end of file diff --git a/src/Umbraco.Examine/Config/IndexSets.cs b/src/Umbraco.Examine/Config/IndexSets.cs deleted file mode 100644 index c6ad1476c3..0000000000 --- a/src/Umbraco.Examine/Config/IndexSets.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Configuration; - -namespace Umbraco.Examine.Config -{ - public sealed class IndexSets : ConfigurationSection - { - #region Singleton definition - - private IndexSets() { } - - public static IndexSets Instance { get; } = ConfigurationManager.GetSection(SectionName) as IndexSets; - - #endregion - - private const string SectionName = "ExamineLuceneIndexSets"; - - [ConfigurationCollection(typeof(IndexSetCollection))] - [ConfigurationProperty("", IsDefaultCollection = true, IsRequired = true)] - public IndexSetCollection Sets => (IndexSetCollection)base[""]; - } -} diff --git a/src/Umbraco.Examine/ContentIndexPopulator.cs b/src/Umbraco.Examine/ContentIndexPopulator.cs index 72615b4b26..51b9de4a0b 100644 --- a/src/Umbraco.Examine/ContentIndexPopulator.cs +++ b/src/Umbraco.Examine/ContentIndexPopulator.cs @@ -58,8 +58,10 @@ namespace Umbraco.Examine _parentId = parentId; } - protected override void PopulateIndexes(IEnumerable indexes) + protected override void PopulateIndexes(IReadOnlyList indexes) { + if (indexes.Count == 0) return; + const int pageSize = 10000; var pageIndex = 0; diff --git a/src/Umbraco.Examine/IIndexPopulator.cs b/src/Umbraco.Examine/IIndexPopulator.cs index 153e88d46b..97a1216fae 100644 --- a/src/Umbraco.Examine/IIndexPopulator.cs +++ b/src/Umbraco.Examine/IIndexPopulator.cs @@ -1,22 +1,20 @@ -using System.Collections.Generic; -using Examine; +using Examine; namespace Umbraco.Examine { public interface IIndexPopulator { /// - /// If this index is registered with this populatr + /// If this index is registered with this populator /// /// /// bool IsRegistered(IIndex index); /// - /// Populate indexers + /// Populate indexers /// /// void Populate(params IIndex[] indexes); } - } diff --git a/src/Umbraco.Examine/IndexPopulator.cs b/src/Umbraco.Examine/IndexPopulator.cs index 9cd985df16..f9d4d85dc8 100644 --- a/src/Umbraco.Examine/IndexPopulator.cs +++ b/src/Umbraco.Examine/IndexPopulator.cs @@ -38,9 +38,9 @@ namespace Umbraco.Examine public void Populate(params IIndex[] indexes) { - PopulateIndexes(indexes.Where(IsRegistered)); + PopulateIndexes(indexes.Where(IsRegistered).ToList()); } - protected abstract void PopulateIndexes(IEnumerable indexes); + protected abstract void PopulateIndexes(IReadOnlyList indexes); } } diff --git a/src/Umbraco.Examine/IndexRebuilder.cs b/src/Umbraco.Examine/IndexRebuilder.cs index d946a8f783..43c309b9c5 100644 --- a/src/Umbraco.Examine/IndexRebuilder.cs +++ b/src/Umbraco.Examine/IndexRebuilder.cs @@ -42,6 +42,8 @@ namespace Umbraco.Examine ? ExamineManager.Indexes.Where(x => !x.IndexExists()) : ExamineManager.Indexes).ToArray(); + if (indexes.Length == 0) return; + foreach (var index in indexes) { index.CreateIndex(); // clear the index diff --git a/src/Umbraco.Examine/MediaIndexPopulator.cs b/src/Umbraco.Examine/MediaIndexPopulator.cs index 2232d359e7..6dadcbe4b3 100644 --- a/src/Umbraco.Examine/MediaIndexPopulator.cs +++ b/src/Umbraco.Examine/MediaIndexPopulator.cs @@ -39,8 +39,10 @@ namespace Umbraco.Examine _mediaValueSetBuilder = mediaValueSetBuilder; } - protected override void PopulateIndexes(IEnumerable indexes) + protected override void PopulateIndexes(IReadOnlyList indexes) { + if (indexes.Count == 0) return; + const int pageSize = 10000; var pageIndex = 0; diff --git a/src/Umbraco.Examine/MemberIndexPopulator.cs b/src/Umbraco.Examine/MemberIndexPopulator.cs index 6e97ee9195..e20dab91ca 100644 --- a/src/Umbraco.Examine/MemberIndexPopulator.cs +++ b/src/Umbraco.Examine/MemberIndexPopulator.cs @@ -17,8 +17,10 @@ namespace Umbraco.Examine _memberService = memberService; _valueSetBuilder = valueSetBuilder; } - protected override void PopulateIndexes(IEnumerable indexes) + protected override void PopulateIndexes(IReadOnlyList indexes) { + if (indexes.Count == 0) return; + const int pageSize = 1000; var pageIndex = 0; diff --git a/src/Umbraco.Examine/Umbraco.Examine.csproj b/src/Umbraco.Examine/Umbraco.Examine.csproj index 2bdf6f833d..a68131da0d 100644 --- a/src/Umbraco.Examine/Umbraco.Examine.csproj +++ b/src/Umbraco.Examine/Umbraco.Examine.csproj @@ -48,19 +48,12 @@ - + - - - - - - - diff --git a/src/Umbraco.Examine/UmbracoContentIndex.cs b/src/Umbraco.Examine/UmbracoContentIndex.cs index e16015e192..a9e2c72cb6 100644 --- a/src/Umbraco.Examine/UmbracoContentIndex.cs +++ b/src/Umbraco.Examine/UmbracoContentIndex.cs @@ -6,14 +6,10 @@ using System.Linq; using Examine; using Umbraco.Core; using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Examine.LuceneEngine.Indexing; -using Examine.LuceneEngine.Providers; using Lucene.Net.Analysis; using Lucene.Net.Store; using Umbraco.Core.Composing; using Umbraco.Core.Logging; -using Umbraco.Examine.Config; using Examine.LuceneEngine; namespace Umbraco.Examine @@ -27,18 +23,7 @@ namespace Umbraco.Examine protected ILocalizationService LanguageService { get; } #region Constructors - - /// - /// Constructor for configuration providers - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public UmbracoContentIndex() - { - LanguageService = Current.Services.LocalizationService; - - //note: The validator for this config based indexer is set in the Initialize method - } - + /// /// Create an index at runtime /// @@ -52,14 +37,14 @@ namespace Umbraco.Examine /// public UmbracoContentIndex( string name, - FieldDefinitionCollection fieldDefinitions, Directory luceneDirectory, + FieldDefinitionCollection fieldDefinitions, Analyzer defaultAnalyzer, IProfilingLogger profilingLogger, ILocalizationService languageService, IContentValueSetValidator validator, IReadOnlyDictionary indexValueTypes = null) - : base(name, fieldDefinitions, luceneDirectory, defaultAnalyzer, profilingLogger, validator, indexValueTypes) + : base(name, luceneDirectory, fieldDefinitions, defaultAnalyzer, profilingLogger, validator, indexValueTypes) { if (validator == null) throw new ArgumentNullException(nameof(validator)); LanguageService = languageService ?? throw new ArgumentNullException(nameof(languageService)); @@ -70,65 +55,6 @@ namespace Umbraco.Examine #endregion - #region Initialize - - /// - /// Set up all properties for the indexer based on configuration information specified. This will ensure that - /// all of the folders required by the indexer are created and exist. This will also create an instruction - /// file declaring the computer name that is part taking in the indexing. This file will then be used to - /// determine the master indexer machine in a load balanced environment (if one exists). - /// - /// The friendly name of the provider. - /// A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider. - /// - /// The name of the provider is null. - /// - /// - /// The name of the provider has a length of zero. - /// - /// - /// An attempt is made to call on a provider after the provider has already been initialized. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override void Initialize(string name, NameValueCollection config) - { - base.Initialize(name, config); - - var supportUnpublished = false; - var supportProtected = false; - - //check if there's a flag specifying to support unpublished content, - //if not, set to false; - if (config["supportUnpublished"] != null) - bool.TryParse(config["supportUnpublished"], out supportUnpublished); - - //check if there's a flag specifying to support protected content, - //if not, set to false; - if (config["supportProtected"] != null) - bool.TryParse(config["supportProtected"], out supportProtected); - - - //now we need to build up the indexer options so we can create our validator - int? parentId = null; - if (IndexSetName.IsNullOrWhiteSpace() == false) - { - var indexSet = IndexSets.Instance.Sets[IndexSetName]; - parentId = indexSet.IndexParentId; - } - - ValueSetValidator = new ContentValueSetValidator( - supportUnpublished, supportProtected, - //Using a singleton here, we can't inject this when using config based providers and we don't use this - //anywhere else in this class - Current.Services.PublicAccessService, - parentId, - ConfigIndexCriteria?.IncludeItemTypes, ConfigIndexCriteria?.ExcludeItemTypes); - - PublishedValuesOnly = supportUnpublished; - } - - #endregion - /// /// Special check for invalid paths /// @@ -166,8 +92,8 @@ namespace Umbraco.Examine //these are the invalid items so we'll delete them //since the path is not valid we need to delete this item in case it exists in the index already and has now //been moved to an invalid parent. - foreach (var i in group) - base.PerformDeleteFromIndex(i.Id, args => { /*noop*/ }); + + base.PerformDeleteFromIndex(group.Select(x => x.Id), args => { /*noop*/ }); } else { @@ -192,24 +118,28 @@ namespace Umbraco.Examine /// When a content node is deleted, we also need to delete it's children from the index so we need to perform a /// custom Lucene search to find all decendents and create Delete item queues for them too. /// - /// ID of the node to delete + /// ID of the node to delete /// - protected override void PerformDeleteFromIndex(string nodeId, Action onComplete) + protected override void PerformDeleteFromIndex(IEnumerable itemIds, Action onComplete) { - //find all descendants based on path - var descendantPath = $@"\-1\,*{nodeId}\,*"; - var rawQuery = $"{IndexPathFieldName}:{descendantPath}"; - var searcher = GetSearcher(); - var c = searcher.CreateQuery(); - var filtered = c.NativeQuery(rawQuery); - var results = filtered.Execute(); + var idsAsList = itemIds.ToList(); + foreach (var nodeId in idsAsList) + { + //find all descendants based on path + var descendantPath = $@"\-1\,*{nodeId}\,*"; + var rawQuery = $"{IndexPathFieldName}:{descendantPath}"; + var searcher = GetSearcher(); + var c = searcher.CreateQuery(); + var filtered = c.NativeQuery(rawQuery); + var results = filtered.Execute(); - ProfilingLogger.Debug(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, results.TotalItemCount); + ProfilingLogger.Debug(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, results.TotalItemCount); - //need to queue a delete item for each one found - QueueIndexOperation(results.Select(r => new IndexOperation(new ValueSet(r.Id), IndexOperationType.Delete))); + //need to queue a delete item for each one found + QueueIndexOperation(results.Select(r => new IndexOperation(new ValueSet(r.Id), IndexOperationType.Delete))); + } - base.PerformDeleteFromIndex(nodeId, onComplete); + base.PerformDeleteFromIndex(idsAsList, onComplete); } } diff --git a/src/Umbraco.Examine/UmbracoExamineIndex.cs b/src/Umbraco.Examine/UmbracoExamineIndex.cs index 02cd80b54b..24952050da 100644 --- a/src/Umbraco.Examine/UmbracoExamineIndex.cs +++ b/src/Umbraco.Examine/UmbracoExamineIndex.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using Examine.LuceneEngine.Providers; using Lucene.Net.Analysis; @@ -9,11 +8,9 @@ using Lucene.Net.Index; using Umbraco.Core; using Examine; using Examine.LuceneEngine; -using Examine.LuceneEngine.Indexing; using Lucene.Net.Store; using Umbraco.Core.Composing; using Umbraco.Core.Logging; -using Umbraco.Examine.Config; using Directory = Lucene.Net.Store.Directory; namespace Umbraco.Examine @@ -43,17 +40,6 @@ namespace Umbraco.Examine /// public const string RawFieldPrefix = SpecialFieldPrefix + "Raw_"; - /// - /// Constructor for config provider based indexes - /// - [EditorBrowsable(EditorBrowsableState.Never)] - protected UmbracoExamineIndex() - { - ProfilingLogger = Current.ProfilingLogger; - _configBased = true; - _diagnostics = new UmbracoExamineIndexDiagnostics(this, ProfilingLogger); - } - /// /// Create a new /// @@ -66,13 +52,13 @@ namespace Umbraco.Examine /// protected UmbracoExamineIndex( string name, - FieldDefinitionCollection fieldDefinitions, Directory luceneDirectory, + FieldDefinitionCollection fieldDefinitions, Analyzer defaultAnalyzer, IProfilingLogger profilingLogger, IValueSetValidator validator = null, IReadOnlyDictionary indexValueTypes = null) - : base(name, fieldDefinitions, luceneDirectory, defaultAnalyzer, validator, indexValueTypes) + : base(name, luceneDirectory, fieldDefinitions, defaultAnalyzer, validator, indexValueTypes) { ProfilingLogger = profilingLogger ?? throw new ArgumentNullException(nameof(profilingLogger)); @@ -102,106 +88,19 @@ namespace Umbraco.Examine return searcher.GetAllIndexedFields(); } - protected ConfigIndexCriteria ConfigIndexCriteria { get; private set; } - - /// - /// The index set name which references an Examine - /// - public string IndexSetName { get; private set; } - - #region Initialize - - - /// - /// Setup the properties for the indexer from the provider settings - /// - /// - /// - /// - /// This is ONLY used for configuration based indexes - /// - public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) - { - ProfilingLogger.Debug(GetType(), "{IndexerName} indexer initializing", name); - - if (config["enableDefaultEventHandler"] != null && bool.TryParse(config["enableDefaultEventHandler"], out var enabled)) - { - EnableDefaultEventHandler = enabled; - } - - //this is config based, so add the default definitions - foreach (var field in UmbracoFieldDefinitionCollection.UmbracoIndexFieldDefinitions) - { - FieldDefinitionCollection.TryAdd(field); - } - - //Need to check if the index set is specified... - if (config["indexSet"] == null) - { - var possibleSuffixes = new[] {"Index", "Indexer"}; - foreach (var suffix in possibleSuffixes) - { - if (!name.EndsWith(suffix)) continue; - - var setNameByConvension = name.Remove(name.LastIndexOf(suffix, StringComparison.Ordinal)) + "IndexSet"; - //check if we can assign the index set by naming convention - var set = IndexSets.Instance.Sets.Cast().SingleOrDefault(x => x.SetName == setNameByConvension); - - if (set == null) continue; - - //we've found an index set by naming conventions :) - IndexSetName = set.SetName; - - var indexSet = IndexSets.Instance.Sets[IndexSetName]; - - //get the index criteria and ensure folder - ConfigIndexCriteria = CreateFieldDefinitionsFromConfig(indexSet); - foreach (var fieldDefinition in ConfigIndexCriteria.StandardFields.Union(ConfigIndexCriteria.UserFields)) - { - //replace any existing or add - FieldDefinitionCollection.AddOrUpdate(fieldDefinition); - } - break; - } - } - else - { - //if an index set is specified, ensure it exists and initialize the indexer based on the set - - if (IndexSets.Instance.Sets[config["indexSet"]] == null) - throw new ArgumentException("The indexSet specified for the LuceneExamineIndexer provider does not exist"); - - IndexSetName = config["indexSet"]; - - var indexSet = IndexSets.Instance.Sets[IndexSetName]; - - //get the index criteria and ensure folder - ConfigIndexCriteria = CreateFieldDefinitionsFromConfig(indexSet); - foreach (var fieldDefinition in ConfigIndexCriteria.StandardFields.Union(ConfigIndexCriteria.UserFields)) - { - //replace any existing or add - FieldDefinitionCollection.AddOrUpdate(fieldDefinition); - } - } - - base.Initialize(name, config); - } - - #endregion - /// /// override to check if we can actually initialize. /// /// /// This check is required since the base examine lib will try to rebuild on startup /// - protected override void PerformDeleteFromIndex(string nodeId, Action onComplete) + protected override void PerformDeleteFromIndex(IEnumerable itemIds, Action onComplete) { if (CanInitialize()) { using (new SafeCallContext()) { - base.PerformDeleteFromIndex(nodeId, onComplete); + base.PerformDeleteFromIndex(itemIds, onComplete); } } } @@ -285,17 +184,7 @@ namespace Umbraco.Examine e.ValueSet.Values[IconFieldName] = icon; } } - - private ConfigIndexCriteria CreateFieldDefinitionsFromConfig(IndexSet indexSet) - { - return new ConfigIndexCriteria( - indexSet.IndexAttributeFields.Cast().Select(x => new FieldDefinition(x.Name, x.Type)).ToArray(), - indexSet.IndexUserFields.Cast().Select(x => new FieldDefinition(x.Name, x.Type)).ToArray(), - indexSet.IncludeNodeTypes.ToList().Select(x => x.Name).ToArray(), - indexSet.ExcludeNodeTypes.ToList().Select(x => x.Name).ToArray(), - indexSet.IndexParentId); - } - + #region IIndexDiagnostics private readonly UmbracoExamineIndexDiagnostics _diagnostics; diff --git a/src/Umbraco.Examine/UmbracoExamineIndexDiagnostics.cs b/src/Umbraco.Examine/UmbracoExamineIndexDiagnostics.cs index 227b52e085..fed5b9bae7 100644 --- a/src/Umbraco.Examine/UmbracoExamineIndexDiagnostics.cs +++ b/src/Umbraco.Examine/UmbracoExamineIndexDiagnostics.cs @@ -64,7 +64,7 @@ namespace Umbraco.Examine { [nameof(UmbracoExamineIndex.CommitCount)] = _index.CommitCount, [nameof(UmbracoExamineIndex.DefaultAnalyzer)] = _index.DefaultAnalyzer.GetType().Name, - [nameof(UmbracoExamineIndex.DirectoryFactory)] = _index.DirectoryFactory, + ["LuceneDirectory"] = _index.GetLuceneDirectory().GetType().Name, [nameof(UmbracoExamineIndex.EnableDefaultEventHandler)] = _index.EnableDefaultEventHandler, [nameof(UmbracoExamineIndex.LuceneIndexFolder)] = _index.LuceneIndexFolder == null diff --git a/src/Umbraco.Examine/UmbracoMemberIndex.cs b/src/Umbraco.Examine/UmbracoMemberIndex.cs index fae818a4a5..9782f94fe4 100644 --- a/src/Umbraco.Examine/UmbracoMemberIndex.cs +++ b/src/Umbraco.Examine/UmbracoMemberIndex.cs @@ -1,18 +1,7 @@ -using System; -using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Services; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; +using System.Collections.Generic; using Examine; using Examine.LuceneEngine; -using Examine.LuceneEngine.Indexing; -using Examine.LuceneEngine.Providers; using Lucene.Net.Analysis; -using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Directory = Lucene.Net.Store.Directory; @@ -24,14 +13,6 @@ namespace Umbraco.Examine /// public class UmbracoMemberIndex : UmbracoExamineIndex { - /// - /// Constructor for config/provider based indexes - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public UmbracoMemberIndex() - { - } - /// /// Constructor to allow for creating an indexer at runtime /// @@ -48,17 +29,10 @@ namespace Umbraco.Examine Analyzer analyzer, IProfilingLogger profilingLogger, IValueSetValidator validator = null) : - base(name, fieldDefinitions, luceneDirectory, analyzer, profilingLogger, validator) + base(name, luceneDirectory, fieldDefinitions, analyzer, profilingLogger, validator) { } - public override void Initialize(string name, NameValueCollection config) - { - base.Initialize(name, config); - - ValueSetValidator = new MemberValueSetValidator(ConfigIndexCriteria.IncludeItemTypes, ConfigIndexCriteria.ExcludeItemTypes); - } - /// /// Overridden to ensure that the umbraco system field definitions are in place /// diff --git a/src/Umbraco.Tests/TestHelpers/Stubs/TestExamineManager.cs b/src/Umbraco.Tests/TestHelpers/Stubs/TestExamineManager.cs index f8d48c5703..7bb3b90d81 100644 --- a/src/Umbraco.Tests/TestHelpers/Stubs/TestExamineManager.cs +++ b/src/Umbraco.Tests/TestHelpers/Stubs/TestExamineManager.cs @@ -9,14 +9,16 @@ namespace Umbraco.Tests.TestHelpers.Stubs private readonly ConcurrentDictionary _indexers = new ConcurrentDictionary(); private readonly ConcurrentDictionary _searchers = new ConcurrentDictionary(); - public void AddIndex(IIndex indexer) + public IIndex AddIndex(IIndex indexer) { _indexers.TryAdd(indexer.Name, indexer); + return indexer; } - public void AddSearcher(ISearcher searcher) + public ISearcher AddSearcher(ISearcher searcher) { _searchers.TryAdd(searcher.Name, searcher); + return searcher; } public void Dispose() diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 661ccb6ab8..bed1281bf8 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -77,7 +77,7 @@ - + 1.8.9 diff --git a/src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs b/src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs index fbbf2042ca..0b36398dd6 100644 --- a/src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs +++ b/src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs @@ -164,8 +164,8 @@ namespace Umbraco.Tests.UmbracoExamine var i = new UmbracoContentIndex( "testIndexer", - new UmbracoFieldDefinitionCollection(), luceneDir, + new UmbracoFieldDefinitionCollection(), analyzer, profilingLogger, languageService, diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js index eaf67bcb91..29920ebf00 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js @@ -146,7 +146,6 @@ function valFormManager(serverValidationManager, $rootScope, $timeout, $location var infiniteEditors = editorService.getEditors(); if (!formCtrl.$dirty && infiniteEditors.length === 0 || isSavingNewItem && infiniteEditors.length === 0) { - confirmed = true; return; } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js index 9fcd81b2ed..9074834ee6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.controller.js @@ -6,11 +6,12 @@ var vm = this; vm.loading = true; vm.hasPristineVariants = false; + vm.isNew = true; vm.changeSelection = changeSelection; vm.dirtyVariantFilter = dirtyVariantFilter; vm.pristineVariantFilter = pristineVariantFilter; - + /** Returns true if publishing is possible based on if there are un-published mandatory languages */ function canPublish() { var selected = []; @@ -22,7 +23,7 @@ var published = !(variant.state === "NotCreated" || variant.state === "Draft"); if ((variant.language.isMandatory && !published) && (!publishable || !variant.publish)) { - //if a mandatory variant isn't published + //if a mandatory variant isn't published //and it's not publishable or not selected to be published //then we cannot continue @@ -53,12 +54,35 @@ return (variant.active || variant.isDirty || variant.state === "Draft" || variant.state === "PublishedPendingChanges" || variant.state === "NotCreated"); } + function hasAnyData(variant) { + var result = variant.isDirty != null || (variant.name != null && variant.name.length > 0); + + if(result) return true; + + for (var t=0; t < variant.tabs.length; t++){ + for (var p=0; p < variant.tabs[t].properties.length; p++){ + + var property = variant.tabs[t].properties[p]; + + if(property.culture == null) continue; + + result = result || (property.value != null && property.value.length > 0); + + if(result) return true; + } + } + + return result; + } + function pristineVariantFilter(variant) { return !(dirtyVariantFilter(variant)); } function onInit() { + + vm.variants = $scope.model.variants; if (!$scope.model.title) { @@ -69,6 +93,13 @@ vm.hasPristineVariants = false; + _.each(vm.variants, + function (variant) { + if(variant.state !== "NotCreated"){ + vm.isNew = false; + } + }); + _.each(vm.variants, function (variant) { variant.compositeId = variant.language.culture + "_" + (variant.segment ? variant.segment : ""); @@ -78,6 +109,10 @@ if (!vm.hasPristineVariants) { vm.hasPristineVariants = pristineVariantFilter(variant); } + + if(vm.isNew && hasAnyData(variant)){ + variant.save = true; + } }); if (vm.variants.length !== 0) { @@ -103,8 +138,16 @@ $scope.model.disableSubmitButton = true; } - vm.loading = false; - + var labelKey = vm.isNew ? "content_languagesToPublishForFirstTime" : "content_languagesToPublish"; + + localizationService.localize(labelKey).then(function (value) { + vm.headline = value; + + vm.loading = false; + }); + + + } onInit(); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html index 8ca8b78b23..b33b7ccbfc 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html @@ -1,7 +1,7 @@
-

+

{{vm.headline}}

@@ -65,7 +65,7 @@
{{notification.message}}
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js index a99da13811..8d21234aee 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js @@ -1,16 +1,17 @@ (function () { "use strict"; - + function SaveContentController($scope, localizationService) { var vm = this; vm.loading = true; vm.hasPristineVariants = false; + vm.isNew = true; vm.changeSelection = changeSelection; vm.dirtyVariantFilter = dirtyVariantFilter; vm.pristineVariantFilter = pristineVariantFilter; - + function changeSelection(variant) { var firstSelected = _.find(vm.variants, function (v) { return v.save; @@ -30,8 +31,28 @@ return !(dirtyVariantFilter(variant)); } - function onInit() { + function hasAnyData(variant) { + var result = variant.isDirty != null || (variant.name != null && variant.name.length > 0); + if(result) return true; + + for (var t=0; t < variant.tabs.length; t++){ + for (var p=0; p < variant.tabs[t].properties.length; p++){ + + var property = variant.tabs[t].properties[p]; + + if(property.culture == null) continue; + + result = result || (property.value != null && property.value.length > 0); + + if(result) return true; + } + } + + return result; + } + + function onInit() { vm.variants = $scope.model.variants; if(!$scope.model.title) { @@ -42,6 +63,13 @@ vm.hasPristineVariants = false; + _.each(vm.variants, + function (variant) { + if(variant.state !== "NotCreated"){ + vm.isNew = false; + } + }); + _.each(vm.variants, function (variant) { variant.compositeId = variant.language.culture + "_" + (variant.segment ? variant.segment : ""); @@ -51,6 +79,10 @@ if (!vm.hasPristineVariants) { vm.hasPristineVariants = pristineVariantFilter(variant); } + + if(vm.isNew && hasAnyData(variant)){ + variant.save = true; + } }); if (vm.variants.length !== 0) { @@ -88,5 +120,5 @@ } angular.module("umbraco").controller("Umbraco.Overlays.SaveContentController", SaveContentController); - + })(); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html index 6f4aef4e84..c4dcd5b767 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html @@ -1,72 +1,120 @@
-
-

-
+
-
-
- -
- -
- - -
- -
- -
-
{{saveVariantSelectorForm.saveVariantSelector.errorMsg}}
-
- -
-
{{notification.message}}
-
- -
-
- -
+
+
+

+
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+
{{saveVariantSelectorForm.saveVariantSelector.errorMsg}}
+
+ +
+
{{notification.message}}
+
+ +
+
+ +
+
+
-
-
-
-

+
+
+

-
-
-
- {{ variant.language.name }} - * -
+
-
- -
+
+ +
+ +
+ -
-
{{notification.message}}
+
+ +
+ +
+
{{saveVariantSelectorForm.saveVariantSelector.errorMsg}}
+
+ +
+
{{notification.message}}
+
+ +
+
+ + +
+
+
+ +
+
+

+
+ +
+
+
+ {{ variant.language.name }} + * +
+ +
+ +
+ +
+
{{notification.message}}
+
-
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 4ccead279a..418e5de677 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -88,7 +88,7 @@ - + @@ -260,16 +260,9 @@ scripting.config - - ExamineSettings.config - feedProxy.config - - ExamineIndex.config - Designer - Dashboard.config Designer @@ -317,10 +310,6 @@ Designer - - - Designer - diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index a96abadbbe..eaa1c6c39e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -270,8 +270,10 @@ Include drafts: also publish unpublished content items. This value is hidden. If you need access to view this value please contact your website administrator. This value is hidden. + What languages would you like to publish? All languages with content are saved! What languages would you like to publish? What languages would you like to save? + All languages with content are saved on creation! What languages would you like to send for approval? What languages would you like to schedule? Select the languages to unpublish. Unpublishing a mandatory language will unpublish all languages. diff --git a/src/Umbraco.Web.UI/config/ExamineIndex.Release.config b/src/Umbraco.Web.UI/config/ExamineIndex.Release.config deleted file mode 100644 index ec0d18aa2d..0000000000 --- a/src/Umbraco.Web.UI/config/ExamineIndex.Release.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/src/Umbraco.Web.UI/config/ExamineIndex.config b/src/Umbraco.Web.UI/config/ExamineIndex.config deleted file mode 100644 index 833a65c8d1..0000000000 --- a/src/Umbraco.Web.UI/config/ExamineIndex.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/src/Umbraco.Web.UI/config/ExamineSettings.Release.config b/src/Umbraco.Web.UI/config/ExamineSettings.Release.config deleted file mode 100644 index 6b3aaa0372..0000000000 --- a/src/Umbraco.Web.UI/config/ExamineSettings.Release.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/config/ExamineSettings.config b/src/Umbraco.Web.UI/config/ExamineSettings.config deleted file mode 100644 index f0fd2b69fc..0000000000 --- a/src/Umbraco.Web.UI/config/ExamineSettings.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/Umbraco.Web.UI/web.Template.Debug.config b/src/Umbraco.Web.UI/web.Template.Debug.config index 5a37c4a09b..8c4b3bb299 100644 --- a/src/Umbraco.Web.UI/web.Template.Debug.config +++ b/src/Umbraco.Web.UI/web.Template.Debug.config @@ -1,7 +1,8 @@ - + + +
+
+ + + + + - + diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index 6bc1216d34..68fee030a0 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -10,8 +10,6 @@
-
-
@@ -36,8 +34,6 @@ - - diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 9f0e350e55..80ba00d07a 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -515,13 +515,14 @@ namespace Umbraco.Web.Editors [HttpPost] public SimpleNotificationModel CreateBlueprintFromContent([FromUri]int contentId, [FromUri]string name) { - if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name"); + if (string.IsNullOrWhiteSpace(name)) + throw new ArgumentException("Value cannot be null or whitespace.", nameof(name)); var content = Services.ContentService.GetById(contentId); if (content == null) throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); - EnsureUniqueName(name, content, "name"); + EnsureUniqueName(name, content, nameof(name)); var blueprint = Services.ContentService.CreateContentFromBlueprint(content, name, Security.GetUserId().ResultOr(0)); @@ -612,7 +613,7 @@ namespace Umbraco.Web.Editors var msKey = $"Variants[{variantCount}].Name"; if (ModelState.ContainsKey(msKey)) { - if (!variant.Save) + if (!variant.Save || IsCreatingAction(contentItem.Action)) ModelState.Remove(msKey); else variantNameErrors.Add(variant.Culture); diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs index 229a981510..9e45bc17c5 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs @@ -239,9 +239,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache try { - if (eMgr.TryGetIndex(Constants.UmbracoIndexes.InternalIndexName, out var index)) - return index.GetSearcher(); - throw new InvalidOperationException($"No index found by name {Constants.UmbracoIndexes.InternalIndexName}"); + return eMgr.TryGetIndex(Constants.UmbracoIndexes.InternalIndexName, out var index) ? index.GetSearcher() : null; } catch (FileNotFoundException) { diff --git a/src/Umbraco.Web/Search/ExamineComposer.cs b/src/Umbraco.Web/Search/ExamineComposer.cs index ced169e6dc..8ee2caedee 100644 --- a/src/Umbraco.Web/Search/ExamineComposer.cs +++ b/src/Umbraco.Web/Search/ExamineComposer.cs @@ -21,12 +21,12 @@ namespace Umbraco.Web.Search { base.Compose(composition); - // populators are not a collection: once cannot remove ours, and can only add more + // populators are not a collection: one cannot remove ours, and can only add more // the container can inject IEnumerable and get them all - composition.Register(Lifetime.Singleton); - composition.Register(Lifetime.Singleton); - composition.Register(Lifetime.Singleton); - composition.Register(Lifetime.Singleton); + composition.Register(Lifetime.Singleton); + composition.Register(Lifetime.Singleton); + composition.Register(Lifetime.Singleton); + composition.Register(Lifetime.Singleton); composition.Register(Lifetime.Singleton); composition.RegisterUnique(); diff --git a/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs b/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs index 0f587797af..99f4c4b453 100644 --- a/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs +++ b/src/Umbraco.Web/Search/UmbracoIndexesCreator.cs @@ -1,20 +1,11 @@ using System.Collections.Generic; using Umbraco.Core.Logging; using Umbraco.Core.Services; -using Umbraco.Core.Strings; using Umbraco.Examine; -using Umbraco.Core.Persistence; -using Umbraco.Core.IO; -using System.IO; -using Lucene.Net.Store; using Lucene.Net.Analysis.Standard; -using Lucene.Net.Analysis; using Examine.LuceneEngine; using Examine; -using Examine.LuceneEngine.Providers; -using System.Linq; using Umbraco.Core; -using Umbraco.Core.Models; namespace Umbraco.Web.Search { @@ -59,8 +50,8 @@ namespace Umbraco.Web.Search { var index = new UmbracoContentIndex( Constants.UmbracoIndexes.InternalIndexName, - new UmbracoFieldDefinitionCollection(), CreateFileSystemLuceneDirectory(Constants.UmbracoIndexes.InternalIndexPath), + new UmbracoFieldDefinitionCollection(), new CultureInvariantWhitespaceAnalyzer(), ProfilingLogger, LanguageService, @@ -72,8 +63,8 @@ namespace Umbraco.Web.Search { var index = new UmbracoContentIndex( Constants.UmbracoIndexes.ExternalIndexName, - new UmbracoFieldDefinitionCollection(), CreateFileSystemLuceneDirectory(Constants.UmbracoIndexes.ExternalIndexPath), + new UmbracoFieldDefinitionCollection(), new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), ProfilingLogger, LanguageService, diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 180f69e2cc..fa1b620152 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -63,7 +63,7 @@ - + 2.6.2.25