Olti
02/12/2025, 1:01 PM__NodeId    1650
__NodeTypeAlias    USNPage
__Path    -1,2260,1591,1606,1650
__Published    y
combinedField    icon-layout color-black y ... (includes full text)
mainContent_en-us    0 {"text":"","headingtag":""} {"text":"","headingtag":""} (seems empty)
nodeName    1.3 Vision Mission Leitbild
searchablePath    -1 2260 1591 1606 1650Olti
02/12/2025, 4:18 PMOlti
02/12/2025, 4:20 PMOlti
02/12/2025, 4:23 PMOlti
02/12/2025, 5:00 PMMike Chambers
02/12/2025, 5:12 PMMike Chambers
02/12/2025, 5:13 PMMike Chambers
02/12/2025, 5:18 PMpublic override IPropertyIndexValueFactory PropertyIndexValueFactory => _tagPropertyIndexValueFactory;Olti
02/12/2025, 5:38 PMJemayn
02/13/2025, 12:05 PMOlti
02/13/2025, 12:08 PMusing Umbraco.Cms.Core.Models.PublishedContent;
namespace HunzikerIntranet.HQM.Umbraco.Models
{
    public class PagedSearchResult
    {
        public IEnumerable<IPublishedContent> Results { get; set; }
            = Enumerable.Empty<IPublishedContent>();
        public long TotalItemCount { get; set; }
        public int CurrentPage { get; set; }
        public int TotalPages { get; set; }
        public int PageSize { get; set; }
    }
}Olti
02/13/2025, 12:09 PMJemayn
02/13/2025, 12:26 PMitem.Value<string>("combinedField")csharp
var finalSearchList = searchResults
                .ToPublishedSearchResults(umbracoContext.PublishedSnapshot.Content)
                .Select(x => x.Content);Olti
02/13/2025, 12:33 PMOlti
02/13/2025, 12:34 PMOlti
02/13/2025, 1:10 PMOlti
02/13/2025, 1:11 PMOlti
02/13/2025, 1:24 PMOlti
02/13/2025, 1:24 PMMike Chambers
02/13/2025, 2:25 PMcsharp
using Examine;
using Examine.Lucene;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Examine;
namespace www.Extensions.Examine
{
    public sealed class ConfigureExamineIndexOptions : IConfigureNamedOptions<LuceneDirectoryIndexOptions>
    {
        public readonly IPublicAccessService _publicAccessService;
        [Obsolete("Update when Umbraco Core ContentValueSetValidator is updated")]
        private readonly IScopeProvider _scopeProvider;
        [Obsolete("Update when Umbraco Core ContentValueSetValidator is updated")]
        public ConfigureExamineIndexOptions(IPublicAccessService publicAccessService, IScopeProvider scopeProvider)
        {
            _publicAccessService = publicAccessService;
            _scopeProvider = scopeProvider;
        }
        [Obsolete("Update when Umbraco Core ContentValueSetValidator is updated")]
        public void Configure(string? name, LuceneDirectoryIndexOptions options)
        {
            switch (name)
            {
                //NB you need to rebuild the examine index for these changes to take effect
                case Constants.UmbracoIndexes.ExternalIndexName:
                    options.Validator = new ContentValueSetValidator(true, true, _publicAccessService, _scopeProvider);
                    break;                
            }
        }
        public void Configure(LuceneDirectoryIndexOptions options) => throw new NotImplementedException("This is never called and is just part of the interface");
    }
    public class SearchComposer : IComposer
    {
        public void Compose(IUmbracoBuilder builder)
        {
            // Custom Examine configuration
            builder.Services.ConfigureOptions<ConfigureExamineIndexOptions>();
        }
    }
}Mike Chambers
02/13/2025, 2:25 PMoptions.Validator = new ContentValueSetValidator(true, true, _publicAccessService, _scopeProvider);Mike Chambers
02/13/2025, 2:29 PMpublic ContentValueSetValidator(
        bool publishedValuesOnly,
        bool supportProtectedContent,
        IPublicAccessService? publicAccessService,
        IScopeProvider? scopeProvider)Olti
02/14/2025, 10:19 AMOlti
02/14/2025, 11:10 AMusing HunzikerIntranet.HQM.Umbraco.Infrastructure.Configuration;
using HunzikerIntranet.HQM.Umbraco.Interfaces;
using HunzikerIntranet.HQM.Umbraco.Security;
using HunzikerIntranet.HQM.Umbraco.Services;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.Configure<AzureAdSettings>(
    builder.Configuration.GetSection("AzureAd")
);
builder.Services.AddTransient<ISearchService, SearchService>();
builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddDeliveryApi()
    .AddComposers()
    .ConfigureAuthenticationMembers(builder.Configuration)
    .Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseUmbraco()
    .WithMiddleware(u =>
    {
        u.UseBackOffice();
        u.UseWebsite();
    })
    .WithEndpoints(u =>
    {
        u.UseInstallerEndpoints();
        u.UseBackOfficeEndpoints();
        u.UseWebsiteEndpoints();
    });
await app.RunAsync();Mike Chambers
02/14/2025, 11:17 AMOlti
02/14/2025, 11:18 AMMike Chambers
02/14/2025, 11:19 AMMike Chambers
02/14/2025, 11:19 AMOlti
02/14/2025, 11:20 AMOlti
02/14/2025, 11:20 AMMike Chambers
02/14/2025, 11:20 AMOlti
02/14/2025, 11:21 AMOlti
02/14/2025, 11:23 AMOlti
02/14/2025, 11:23 AMOlti
02/14/2025, 11:24 AMMike Chambers
02/14/2025, 11:42 AMrestrict public accessOlti
02/14/2025, 12:14 PMOlti
02/14/2025, 12:42 PMOlti
02/14/2025, 2:08 PMOlti
02/17/2025, 8:18 AMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by