Use ExternalIndexName as default parameter value

This commit is contained in:
Ronald Barendse
2020-01-05 22:26:13 +01:00
parent b9e749152f
commit c355e8f5f0
2 changed files with 4 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ namespace Umbraco.Web
/// </para> /// </para>
/// <para>While enumerating results, the ambient culture is changed to be the searched culture.</para> /// <para>While enumerating results, the ambient culture is changed to be the searched culture.</para>
/// </remarks> /// </remarks>
IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = null); IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = Constants.UmbracoIndexes.ExternalIndexName);
/// <summary> /// <summary>
/// Searches content. /// Searches content.
@@ -71,7 +71,7 @@ namespace Umbraco.Web
/// </para> /// </para>
/// <para>While enumerating results, the ambient culture is changed to be the searched culture.</para> /// <para>While enumerating results, the ambient culture is changed to be the searched culture.</para>
/// </remarks> /// </remarks>
IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = null); IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = Constants.UmbracoIndexes.ExternalIndexName);
/// <summary> /// <summary>
/// Executes the query and converts the results to <see cref="PublishedSearchResult" />. /// Executes the query and converts the results to <see cref="PublishedSearchResult" />.

View File

@@ -183,13 +183,13 @@ namespace Umbraco.Web
#region Search #region Search
/// <inheritdoc /> /// <inheritdoc />
public IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = null) public IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = Constants.UmbracoIndexes.ExternalIndexName)
{ {
return Search(term, 0, 0, out _, culture, indexName); return Search(term, 0, 0, out _, culture, indexName);
} }
/// <inheritdoc /> /// <inheritdoc />
public IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = null) public IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = Constants.UmbracoIndexes.ExternalIndexName)
{ {
if (string.IsNullOrEmpty(indexName)) if (string.IsNullOrEmpty(indexName))
{ {
@@ -319,9 +319,6 @@ namespace Umbraco.Web
} }
} }
#endregion #endregion
} }
} }