Adding a constant for the new field name
This commit is contained in:
@@ -72,7 +72,7 @@ namespace Umbraco.Examine
|
||||
{"path", m.Path?.Yield() ?? Enumerable.Empty<string>()},
|
||||
{"nodeType", m.ContentType.Id.ToString().Yield() },
|
||||
{"creatorName", (m.GetCreatorProfile(_userService)?.Name ?? "??").Yield()},
|
||||
{"__umbracoFile", new object[] {umbracoFile}}
|
||||
{UmbracoExamineIndex.UmbracoFileFieldName, new object[] {umbracoFile}}
|
||||
};
|
||||
|
||||
foreach (var property in m.Properties)
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace Umbraco.Examine
|
||||
/// </summary>
|
||||
public const string IndexPathFieldName = SpecialFieldPrefix + "Path";
|
||||
public const string NodeKeyFieldName = SpecialFieldPrefix + "Key";
|
||||
public const string UmbracoFileFieldName = SpecialFieldPrefix + "umbracoFile";
|
||||
public const string IconFieldName = SpecialFieldPrefix + "Icon";
|
||||
public const string PublishedFieldName = SpecialFieldPrefix + "Published";
|
||||
|
||||
|
||||
@@ -180,9 +180,9 @@ namespace Umbraco.Web.Models.Mapping
|
||||
|
||||
target.Name = source.Values.ContainsKey("nodeName") ? source.Values["nodeName"] : "[no name]";
|
||||
|
||||
if (source.Values.ContainsKey("__umbracoFile"))
|
||||
if (source.Values.ContainsKey(UmbracoExamineIndex.UmbracoFileFieldName))
|
||||
{
|
||||
var umbracoFile = source.Values["__umbracoFile"];
|
||||
var umbracoFile = source.Values[UmbracoExamineIndex.UmbracoFileFieldName];
|
||||
if (umbracoFile != null)
|
||||
{
|
||||
target.Name = $"{target.Name} ({umbracoFile})";
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Umbraco.Web.Search
|
||||
break;
|
||||
case UmbracoEntityTypes.Media:
|
||||
type = "media";
|
||||
fields = new[] { "__umbracoFile" };
|
||||
fields = new[] { UmbracoExamineIndex.UmbracoFileFieldName };
|
||||
var allMediaStartNodes = _umbracoContext.Security.CurrentUser.CalculateMediaStartNodeIds(_entityService);
|
||||
AppendPath(sb, UmbracoObjectTypes.Media, allMediaStartNodes, searchFrom, ignoreUserStartNodes, _entityService);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user