Have a code field that the admins would like to use in the Umbraco internal backoffice search.
I've tried adding this field to the internal index (pretty sure that's what's used in the internal search?). I can see this code getting hit on startup but doesn't seem to affect the search results.
Can anyone spot any issues?
using Examine;
using Examine.Lucene;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Composing;
namespace ZZ.Web.v10.Extensions
{
public class ConfigureInternalIndexOptions : IConfigureNamedOptions
{
public void Configure(string name, LuceneDirectoryIndexOptions options)
{
if (name.Equals(Constants.UmbracoIndexes.InternalIndexName))
{
options.FieldDefinitions.AddOrUpdate(new FieldDefinition("code", FieldDefinitionTypes.FullText));
}
}
public void Configure(LuceneDirectoryIndexOptions options)
{
throw new System.NotImplementedException();
}
}
public class ExamineComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Services.ConfigureOptions
();
}
}
}