diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec
index aacd55d4be..51d7e3b8d0 100644
--- a/build/NuSpecs/UmbracoCms.Web.nuspec
+++ b/build/NuSpecs/UmbracoCms.Web.nuspec
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Umbraco.Examine/Umbraco.Examine.csproj b/src/Umbraco.Examine/Umbraco.Examine.csproj
index 75c3f5a230..a037c3028e 100644
--- a/src/Umbraco.Examine/Umbraco.Examine.csproj
+++ b/src/Umbraco.Examine/Umbraco.Examine.csproj
@@ -48,7 +48,7 @@
-
+
diff --git a/src/Umbraco.Examine/UmbracoContentIndex.cs b/src/Umbraco.Examine/UmbracoContentIndex.cs
index 9134c691f4..c584f5bf51 100644
--- a/src/Umbraco.Examine/UmbracoContentIndex.cs
+++ b/src/Umbraco.Examine/UmbracoContentIndex.cs
@@ -200,9 +200,9 @@ namespace Umbraco.Examine
var descendantPath = $@"\-1\,*{nodeId}\,*";
var rawQuery = $"{IndexPathFieldName}:{descendantPath}";
var searcher = GetSearcher();
- var c = searcher.CreateCriteria();
- var filtered = c.RawQuery(rawQuery);
- var results = searcher.Search(filtered);
+ var c = searcher.CreateQuery();
+ var filtered = c.NativeQuery(rawQuery);
+ var results = filtered.Execute();
ProfilingLogger.Logger.Debug(GetType(), "DeleteFromIndex with query: {Query} (found {TotalItems} results)", rawQuery, results.TotalItemCount);
diff --git a/src/Umbraco.Examine/UmbracoExamineExtensions.cs b/src/Umbraco.Examine/UmbracoExamineExtensions.cs
index 8be5a6c1e3..f33b7587e0 100644
--- a/src/Umbraco.Examine/UmbracoExamineExtensions.cs
+++ b/src/Umbraco.Examine/UmbracoExamineExtensions.cs
@@ -1,10 +1,6 @@
-using System;
-using System.ComponentModel;
-using System.Web;
-using Examine.LuceneEngine.SearchCriteria;
-using Examine.SearchCriteria;
+using Examine.LuceneEngine.Search;
+using Examine.Search;
using Umbraco.Core;
-using Umbraco.Examine.Config;
namespace Umbraco.Examine
{
diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs
index d5fdd2bf0c..309ce1c0fb 100644
--- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs
@@ -173,9 +173,9 @@ namespace Umbraco.Tests.PublishedContent
//ensure it still exists in the index (raw examine search)
- var criteria = searcher.CreateCriteria();
+ var criteria = searcher.CreateQuery();
var filter = criteria.Id(3113);
- var found = searcher.Search(filter.Compile());
+ var found = filter.Execute();
Assert.IsNotNull(found);
Assert.AreEqual(1, found.TotalItemCount);
diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj
index a9f38ba391..35a51e0584 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/EventsTest.cs b/src/Umbraco.Tests/UmbracoExamine/EventsTest.cs
index 47fa32cbaa..ed5ae07fc0 100644
--- a/src/Umbraco.Tests/UmbracoExamine/EventsTest.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/EventsTest.cs
@@ -36,7 +36,7 @@ namespace Umbraco.Tests.UmbracoExamine
var valueSet = node.ConvertToValueSet(IndexTypes.Content);
indexer.IndexItems(new[] { valueSet });
- var found = searcher.Search(searcher.CreateCriteria().Id((string)node.Attribute("id")).Compile());
+ var found = searcher.CreateQuery().Id((string)node.Attribute("id")).Execute();
Assert.AreEqual(0, found.TotalItemCount);
}
diff --git a/src/Umbraco.Tests/UmbracoExamine/IndexTest.cs b/src/Umbraco.Tests/UmbracoExamine/IndexTest.cs
index 2f0adfcb25..1bc51b6173 100644
--- a/src/Umbraco.Tests/UmbracoExamine/IndexTest.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/IndexTest.cs
@@ -105,7 +105,7 @@ namespace Umbraco.Tests.UmbracoExamine
var searcher = indexer.GetSearcher();
- var results = searcher.Search(searcher.CreateCriteria().Id(555).Compile());
+ var results = searcher.CreateQuery().Id(555).Execute();
Assert.AreEqual(1, results.TotalItemCount);
var result = results.First();
@@ -137,7 +137,7 @@ namespace Umbraco.Tests.UmbracoExamine
contentRebuilder.Populate(indexer);
mediaRebuilder.Populate(indexer);
- var result = searcher.Search(searcher.CreateCriteria().All().Compile());
+ var result = searcher.CreateQuery().All().Execute();
Assert.AreEqual(29, result.TotalItemCount);
}
@@ -208,7 +208,7 @@ namespace Umbraco.Tests.UmbracoExamine
indexer.IndexItem(node.ConvertToValueSet(IndexTypes.Media));
//it will not exist because it exists under 2222
- var results = searcher.Search(searcher.CreateCriteria().Id(2112).Compile());
+ var results = searcher.CreateQuery().Id(2112).Execute();
Assert.AreEqual(0, results.Count());
//now mimic moving 2112 to 1116
@@ -220,7 +220,7 @@ namespace Umbraco.Tests.UmbracoExamine
indexer.IndexItems(new[] { node.ConvertToValueSet(IndexTypes.Media) });
//now ensure it exists
- results = searcher.Search(searcher.CreateCriteria().Id(2112).Compile());
+ results = searcher.CreateQuery().Id(2112).Execute();
Assert.AreEqual(1, results.Count());
}
}
@@ -251,7 +251,7 @@ namespace Umbraco.Tests.UmbracoExamine
indexer1.IndexItem(node.ConvertToValueSet(IndexTypes.Media));
//it will exist because it exists under 2222
- var results = searcher.Search(searcher.CreateCriteria().Id(2112).Compile());
+ var results = searcher.CreateQuery().Id(2112).Execute();
Assert.AreEqual(1, results.Count());
//now mimic moving the node underneath 1116 instead of 2222
@@ -262,7 +262,7 @@ namespace Umbraco.Tests.UmbracoExamine
indexer1.IndexItems(new[] { node.ConvertToValueSet(IndexTypes.Media) });
//now ensure it's deleted
- results = searcher.Search(searcher.CreateCriteria().Id(2112).Compile());
+ results = searcher.CreateQuery().Id(2112).Execute();
Assert.AreEqual(0, results.Count());
}
}
@@ -287,7 +287,7 @@ namespace Umbraco.Tests.UmbracoExamine
//create the whole thing
rebuilder.Populate(indexer);
- var result = searcher.Search(searcher.CreateCriteria().Field(LuceneIndex.CategoryFieldName, IndexTypes.Content).Compile());
+ var result = searcher.CreateQuery().Field(LuceneIndex.CategoryFieldName, IndexTypes.Content).Execute();
Assert.AreEqual(21, result.TotalItemCount);
//delete all content
@@ -298,13 +298,13 @@ namespace Umbraco.Tests.UmbracoExamine
//ensure it's all gone
- result = searcher.Search(searcher.CreateCriteria().Field(LuceneIndex.CategoryFieldName, IndexTypes.Content).Compile());
+ result = searcher.CreateQuery().Field(LuceneIndex.CategoryFieldName, IndexTypes.Content).Execute();
Assert.AreEqual(0, result.TotalItemCount);
//call our indexing methods
rebuilder.Populate(indexer);
- result = searcher.Search(searcher.CreateCriteria().Field(LuceneIndex.CategoryFieldName, IndexTypes.Content).Compile());
+ result = searcher.CreateQuery().Field(LuceneIndex.CategoryFieldName, IndexTypes.Content).Execute();
Assert.AreEqual(21, result.TotalItemCount);
}
}
@@ -332,10 +332,10 @@ namespace Umbraco.Tests.UmbracoExamine
indexer.DeleteFromIndex(1140.ToString());
//this node had children: 1141 & 1142, let's ensure they are also removed
- var results = searcher.Search(searcher.CreateCriteria().Id(1141).Compile());
+ var results = searcher.CreateQuery().Id(1141).Execute();
Assert.AreEqual(0, results.Count());
- results = searcher.Search(searcher.CreateCriteria().Id(1142).Compile());
+ results = searcher.CreateQuery().Id(1142).Execute();
Assert.AreEqual(0, results.Count());
}
diff --git a/src/Umbraco.Tests/UmbracoExamine/SearchTests.cs b/src/Umbraco.Tests/UmbracoExamine/SearchTests.cs
index 3e96e30c6a..747bab3c6d 100644
--- a/src/Umbraco.Tests/UmbracoExamine/SearchTests.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/SearchTests.cs
@@ -3,18 +3,15 @@ using System.Collections.Generic;
using System.Linq;
using LightInject;
using Examine;
+using Examine.Search;
using NUnit.Framework;
-using Examine.LuceneEngine.SearchCriteria;
-using Examine.SearchCriteria;
using Moq;
using Umbraco.Core.Models;
-using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Core.Services;
-using Umbraco.Examine;
using Umbraco.Tests.Testing;
using Umbraco.Core.PropertyEditors;
-using Umbraco.Core.Strings;
+using Umbraco.Examine;
namespace Umbraco.Tests.UmbracoExamine
{
@@ -68,15 +65,15 @@ namespace Umbraco.Tests.UmbracoExamine
var searcher = indexer.GetSearcher();
- var numberSortedCriteria = searcher.CreateCriteria()
- .ParentId(1148).And()
+ var numberSortedCriteria = searcher.CreateQuery()
+ .ParentId(1148)
.OrderBy(new SortableField("sortOrder", SortType.Int));
- var numberSortedResult = searcher.Search(numberSortedCriteria.Compile());
+ var numberSortedResult = numberSortedCriteria.Execute();
- var stringSortedCriteria = searcher.CreateCriteria()
- .ParentId(1148).And()
+ var stringSortedCriteria = searcher.CreateQuery()
+ .ParentId(1148)
.OrderBy(new SortableField("sortOrder"));//will default to string
- var stringSortedResult = searcher.Search(stringSortedCriteria.Compile());
+ var stringSortedResult = stringSortedCriteria.Execute();
Assert.AreEqual(12, numberSortedResult.TotalItemCount);
Assert.AreEqual(12, stringSortedResult.TotalItemCount);
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index 465544960c..afb3cfa9d7 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -88,7 +88,7 @@
-
+
diff --git a/src/Umbraco.Web/Editors/ExamineManagementController.cs b/src/Umbraco.Web/Editors/ExamineManagementController.cs
index bce2c4a438..b583babee3 100644
--- a/src/Umbraco.Web/Editors/ExamineManagementController.cs
+++ b/src/Umbraco.Web/Editors/ExamineManagementController.cs
@@ -74,7 +74,7 @@ namespace Umbraco.Web.Editors
throw new HttpResponseException(msg);
var results = Examine.ExamineExtensions.TryParseLuceneQuery(query)
- ? searcher.Search(searcher.CreateCriteria().RawQuery(query), maxResults: pageSize * (pageIndex + 1))
+ ? searcher.CreateQuery().NativeQuery(query).Execute(maxResults: pageSize * (pageIndex + 1))
: searcher.Search(query, maxResults: pageSize * (pageIndex + 1));
var pagedResults = results.Skip(pageIndex * pageSize);
diff --git a/src/Umbraco.Web/IPublishedContentQuery.cs b/src/Umbraco.Web/IPublishedContentQuery.cs
index 3ab1c5e3ae..cc388ad094 100644
--- a/src/Umbraco.Web/IPublishedContentQuery.cs
+++ b/src/Umbraco.Web/IPublishedContentQuery.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Xml.XPath;
+using Examine.Search;
using Umbraco.Core;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Xml;
@@ -34,21 +35,21 @@ namespace Umbraco.Web
///
/// Searches content.
///
- IEnumerable Search(string term, bool useWildCards = true, string indexName = null);
+ IEnumerable Search(string term, string indexName = null);
///
/// Searches content.
///
- IEnumerable Search(int skip, int take, out long totalRecords, string term, bool useWildCards = true, string indexName = null);
+ IEnumerable Search(string term, int skip, int take, out long totalRecords, string indexName = null);
///
- /// Searches content.
+ /// Executes the query and converts the results to PublishedSearchResult.
///
- IEnumerable Search(Examine.SearchCriteria.ISearchCriteria criteria, Examine.ISearcher searchProvider = null);
+ IEnumerable Search(IQueryExecutor query);
///
- /// Searches content.
+ /// Executes the query and converts the results to PublishedSearchResult.
///
- IEnumerable Search(int skip, int take, out long totalRecords, Examine.SearchCriteria.ISearchCriteria criteria, Examine.ISearcher searcher = null);
+ IEnumerable Search(IQueryExecutor query, int skip, int take, out long totalRecords);
}
}
diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
index 3f776830a6..229a981510 100644
--- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
+++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs
@@ -6,9 +6,8 @@ using System.Linq;
using System.Threading;
using System.Xml.XPath;
using Examine;
-using Examine.LuceneEngine.SearchCriteria;
using Examine.Providers;
-using Examine.SearchCriteria;
+using Examine.Search;
using Lucene.Net.Store;
using Umbraco.Core;
using Umbraco.Core.Logging;
@@ -16,7 +15,6 @@ using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Xml;
using Umbraco.Examine;
-using umbraco;
using Umbraco.Core.Cache;
using Umbraco.Core.Services;
using Umbraco.Web.Composing;
@@ -108,10 +106,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// first check in Examine for the cache values
// +(+parentID:-1) +__IndexType:media
- var criteria = searchProvider.CreateCriteria("media");
+ var criteria = searchProvider.CreateQuery("media");
var filter = criteria.ParentId(-1).Not().Field(UmbracoExamineIndex.IndexPathFieldName, "-1,-21,".MultipleCharacterWildcard());
- var result = searchProvider.Search(filter.Compile());
+ var result = filter.Execute();
if (result != null)
return result.Select(x => CreateFromCacheValues(ConvertFromSearchResult(x)));
}
@@ -294,10 +292,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
//
// note that since the use of the wildcard, it automatically escapes it in Lucene.
- var criteria = searchProvider.CreateCriteria("media");
+ var criteria = searchProvider.CreateQuery("media");
var filter = criteria.Id(id.ToInvariantString()).Not().Field(UmbracoExamineIndex.IndexPathFieldName, "-1,-21,".MultipleCharacterWildcard());
- var result = searchProvider.Search(filter.Compile()).FirstOrDefault();
+ var result = filter.Execute().FirstOrDefault();
if (result != null) return ConvertFromSearchResult(result);
}
catch (Exception ex)
@@ -508,15 +506,15 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
try
{
//first check in Examine as this is WAY faster
- var criteria = searchProvider.CreateCriteria("media");
+ var criteria = searchProvider.CreateQuery("media");
- var filter = criteria.ParentId(parentId).Not().Field(UmbracoExamineIndex.IndexPathFieldName, "-1,-21,".MultipleCharacterWildcard());
+ var filter = criteria.ParentId(parentId).Not().Field(UmbracoExamineIndex.IndexPathFieldName, "-1,-21,".MultipleCharacterWildcard())
+ .OrderBy(new SortableField("sortOrder", SortType.Int));
//the above filter will create a query like this, NOTE: That since the use of the wildcard, it automatically escapes it in Lucene.
//+(+parentId:3113 -__Path:-1,-21,*) +__IndexType:media
// sort with the Sort field (updated for 8.0)
- var results = searchProvider.Search(
- filter.And().OrderBy(new SortableField("sortOrder", SortType.Int)).Compile());
+ var results = filter.Execute();
if (results.Any())
{
diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs
index e3291f9ad5..8deec5d92a 100644
--- a/src/Umbraco.Web/PublishedContentExtensions.cs
+++ b/src/Umbraco.Web/PublishedContentExtensions.cs
@@ -4,12 +4,13 @@ using System.Data;
using System.Linq;
using System.Web;
using Examine;
-using Examine.LuceneEngine.SearchCriteria;
+using Examine.Search;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
+using Umbraco.Examine;
using Umbraco.Web.Composing;
namespace Umbraco.Web
@@ -282,7 +283,7 @@ namespace Umbraco.Web
#region Search
- public static IEnumerable SearchDescendants(this IPublishedContent content, string term, bool useWildCards = true, string indexName = null)
+ public static IEnumerable SearchDescendants(this IPublishedContent content, string term, string indexName = null)
{
//fixme: pass in the IExamineManager
@@ -292,17 +293,18 @@ namespace Umbraco.Web
var searcher = index.GetSearcher();
- var t = term.Escape().Value;
- if (useWildCards)
- t = term.MultipleCharacterWildcard().Value;
+ //var t = term.Escape().Value;
+ //var luceneQuery = "+__Path:(" + content.Path.Replace("-", "\\-") + "*) +" + t;
- var luceneQuery = "+__Path:(" + content.Path.Replace("-", "\\-") + "*) +" + t;
- var crit = searcher.CreateCriteria().RawQuery(luceneQuery);
+ var query = searcher.CreateQuery()
+ .Field(UmbracoExamineIndex.IndexPathFieldName, (content.Path + ",").MultipleCharacterWildcard())
+ .And()
+ .ManagedQuery(term);
- return content.Search(crit, searcher);
+ return query.Execute().ToPublishedSearchResults(UmbracoContext.Current.ContentCache);
}
- public static IEnumerable SearchChildren(this IPublishedContent content, string term, bool useWildCards = true, string indexName = null)
+ public static IEnumerable SearchChildren(this IPublishedContent content, string term, string indexName = null)
{
//fixme: pass in the IExamineManager
@@ -312,28 +314,15 @@ namespace Umbraco.Web
var searcher = index.GetSearcher();
- var t = term.Escape().Value;
- if (useWildCards)
- t = term.MultipleCharacterWildcard().Value;
+ //var t = term.Escape().Value;
+ //var luceneQuery = "+parentID:" + content.Id + " +" + t;
- var luceneQuery = "+parentID:" + content.Id + " +" + t;
- var crit = searcher.CreateCriteria().RawQuery(luceneQuery);
+ var query = searcher.CreateQuery()
+ .Field("parentID", content.Id)
+ .And()
+ .ManagedQuery(term);
- return content.Search(crit, searcher);
- }
-
- public static IEnumerable Search(this IPublishedContent content, Examine.SearchCriteria.ISearchCriteria criteria, ISearcher searchProvider = null)
- {
- //fixme: pass in the IExamineManager
-
- if (searchProvider == null)
- {
- if (!ExamineManager.Instance.TryGetIndex(Constants.UmbracoIndexes.ExternalIndexName, out var index))
- throw new InvalidOperationException("No index found with name " + Constants.UmbracoIndexes.ExternalIndexName);
- searchProvider = index.GetSearcher();
- }
- var results = searchProvider.Search(criteria);
- return results.ToPublishedSearchResults(UmbracoContext.Current.ContentCache);
+ return query.Execute().ToPublishedSearchResults(UmbracoContext.Current.ContentCache);
}
#endregion
diff --git a/src/Umbraco.Web/PublishedContentQuery.cs b/src/Umbraco.Web/PublishedContentQuery.cs
index 0864203a50..57e57445ef 100644
--- a/src/Umbraco.Web/PublishedContentQuery.cs
+++ b/src/Umbraco.Web/PublishedContentQuery.cs
@@ -4,9 +4,7 @@ using System.Linq;
using System.Reflection;
using System.Xml.XPath;
using Examine;
-using Examine.LuceneEngine.Providers;
-using Examine.LuceneEngine.SearchCriteria;
-using Examine.SearchCriteria;
+using Examine.Search;
using Umbraco.Core;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Services;
@@ -181,16 +179,14 @@ namespace Umbraco.Web
#region Search
///
- public IEnumerable Search(string term, bool useWildCards = true, string indexName = null)
+ public IEnumerable Search(string term, string indexName = null)
{
- return Search(0, 0, out _, term, useWildCards, indexName);
+ return Search(term, 0, 0, out _, indexName);
}
///
- public IEnumerable Search(int skip, int take, out long totalRecords, string term, bool useWildCards = true, string indexName = null)
+ public IEnumerable Search(string term, int skip, int take, out long totalRecords, string indexName = null)
{
- //fixme: inject IExamineManager
-
indexName = string.IsNullOrEmpty(indexName)
? Constants.UmbracoIndexes.ExternalIndexName
: indexName;
@@ -209,25 +205,17 @@ namespace Umbraco.Web
}
///
- public IEnumerable Search(ISearchCriteria criteria, ISearcher searchProvider = null)
+ public IEnumerable Search(IQueryExecutor query)
{
- return Search(0, 0, out _, criteria, searchProvider);
+ return Search(query, 0, 0, out _);
}
///
- public IEnumerable Search(int skip, int take, out long totalRecords, ISearchCriteria criteria, ISearcher searcher = null)
+ public IEnumerable Search(IQueryExecutor query, int skip, int take, out long totalRecords)
{
- //fixme: inject IExamineManager
- if (searcher == null)
- {
- if (!ExamineManager.Instance.TryGetIndex(Constants.UmbracoIndexes.ExternalIndexName, out var index))
- throw new InvalidOperationException($"No index found by name {Constants.UmbracoIndexes.ExternalIndexName}");
- searcher = index.GetSearcher();
- }
-
var results = skip == 0 && take == 0
- ? searcher.Search(criteria)
- : searcher.Search(criteria, maxResults: skip + take);
+ ? query.Execute()
+ : query.Execute(maxResults: skip + take);
totalRecords = results.TotalItemCount;
return results.ToPublishedSearchResults(_contentCache);
diff --git a/src/Umbraco.Web/Search/ExamineComponent.cs b/src/Umbraco.Web/Search/ExamineComponent.cs
index 555414da44..71061a5cb3 100644
--- a/src/Umbraco.Web/Search/ExamineComponent.cs
+++ b/src/Umbraco.Web/Search/ExamineComponent.cs
@@ -490,9 +490,7 @@ namespace Umbraco.Web.Search
while (page * pageSize < total)
{
//paging with examine, see https://shazwazza.com/post/paging-with-examine/
- var results = searcher.Search(
- searcher.CreateCriteria().Field("nodeType", id).Compile(),
- maxResults: pageSize * (page + 1));
+ var results = searcher.CreateQuery().Field("nodeType", id).Execute(maxResults: pageSize * (page + 1));
total = results.TotalItemCount;
var paged = results.Skip(page * pageSize);
diff --git a/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
index c3ab7318a0..47e73d383c 100644
--- a/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
+++ b/src/Umbraco.Web/Search/UmbracoTreeSearcher.cs
@@ -109,11 +109,9 @@ namespace Umbraco.Web.Search
return Enumerable.Empty();
}
- var raw = internalSearcher.CreateCriteria().RawQuery(sb.ToString());
-
- var result = internalSearcher
+ var result = internalSearcher.CreateQuery().NativeQuery(sb.ToString())
//only return the number of items specified to read up to the amount of records to fill from 0 -> the number of items on the page requested
- .Search(raw, Convert.ToInt32(pageSize * (pageIndex + 1)));
+ .Execute(Convert.ToInt32(pageSize * (pageIndex + 1)));
totalFound = result.TotalItemCount;
diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index eb6eab9829..9c44539f92 100755
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -62,7 +62,7 @@
-
+
2.6.2.25
diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs
index 9698e3e024..b98db65b27 100644
--- a/src/Umbraco.Web/UmbracoHelper.cs
+++ b/src/Umbraco.Web/UmbracoHelper.cs
@@ -775,62 +775,6 @@ namespace Umbraco.Web
#endregion
- #region Search
-
- ///
- /// Searches content.
- ///
- ///
- ///
- ///
- ///
- public IEnumerable Search(string term, bool useWildCards = true, string indexName = null)
- {
- return ContentQuery.Search(term, useWildCards, indexName);
- }
-
- ///
- /// Searches content.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public IEnumerable Search(int skip, int take, out long totalRecords, string term, bool useWildCards = true, string indexName = null)
- {
- return ContentQuery.Search(skip, take, out totalRecords, term, useWildCards, indexName);
- }
-
- ///
- /// Searhes content.
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public IEnumerable Search(int skip, int take, out long totalRecords, Examine.SearchCriteria.ISearchCriteria criteria, Examine.Providers.BaseSearchProvider searchProvider = null)
- {
- return ContentQuery.Search(skip, take, out totalRecords, criteria, searchProvider);
- }
-
- ///
- /// Searhes content.
- ///
- ///
- ///
- ///
- public IEnumerable Search(Examine.SearchCriteria.ISearchCriteria criteria, Examine.Providers.BaseSearchProvider searchProvider = null)
- {
- return ContentQuery.Search(criteria, searchProvider);
- }
-
- #endregion
-
#region Strings
///