question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot rebuild Examine Index

See original GitHub issue

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

11.3.0

Bug summary

Hi! Today, I updated my Umbraco 11 site to Umbraco 11.3 and discovered that my web search functionality is no longer producing any results. Typically, when faced with this type of issue, I attempt to rebuild the indexes. However, I’m unable to do so due to the following error message:

The process is taking longer than expected, check the Umbraco log to see if there have been any errors during this operation

I tried rebuilding the Internal, External, and two custom indexes, but none of them seem to work.

Error message: Error occurred executing "workItem". and a stack trace:

System.NotSupportedException: Variation "de,<null>" is not supported by the property type.
   at Umbraco.Cms.Core.Models.Property.SetValue(Object value, String culture, String segment)
   at Umbraco.Cms.Core.PropertyEditors.NestedPropertyIndexValueFactoryBase`2.GetNestedResults(String keyPrefix, String culture, String segment, Boolean published, IDictionary`2 propertyTypeDictionary, TItem nestedContentRowValue)+MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Umbraco.Cms.Core.PropertyEditors.NestedPropertyIndexValueFactoryBase`2.Handle(TSerialized deserializedPropertyValue, IProperty property, String culture, String segment, Boolean published)
   at Umbraco.Cms.Core.PropertyEditors.JsonPropertyIndexValueFactoryBase`1.GetIndexValues(IProperty property, String culture, String segment, Boolean published)
   at Umbraco.Cms.Infrastructure.Examine.BaseValueSetBuilder`1.AddPropertyValue(IProperty property, String culture, String segment, IDictionary`2 values)
   at Umbraco.Cms.Infrastructure.Examine.ContentValueSetBuilder.GetValueSetsEnumerable(IContent[] content, Dictionary`2 creatorIds, Dictionary`2 writerIds)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.IndexPublishedContent(Int32 contentParentId, Int32 pageIndex, Int32 pageSize, IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.PopulateIndexes(IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.IndexPopulator.Populate(IIndex[] indexes)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.RebuildIndex(String indexName, TimeSpan delay, CancellationToken cancellationToken)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.<>c__DisplayClass9_1.<RebuildIndex>b__1()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.BackgroundProcessing(CancellationToken stoppingToken)

Specifics

No response

Steps to reproduce

Upgrade Umbraco 11 to 11.3

Expected result / actual result

No response


This item has been added to our backlog AB#28491

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
nikolajlauridsencommented, Apr 27, 2023

Just to add we’ve released patches for 10 and 11 with this fix that is now live on nuget 😄

2reactions
PerplexDanielcommented, Apr 21, 2023

@kjac I also ran into this issue in 10.5 yesterday. This error looks similar to something we encountered at some point in our package (Perplex.ContentBlocks) and the fix was to properly set the .Variations property on the IPropertyType, perhaps this is something you guys need to do as well so I thought I’ll drop the snippet here (taken from here):

if (culture != null) propType.Variations |= ContentVariation.Culture;
if (segment != null) propType.Variations |= ContentVariation.Segment;

You may have to adjust the way you build the propertyTypeDictionary here and perhaps do something like this (untested code):

var propertyTypeDictionary =
    contentType
        .PropertyGroups
        .SelectMany(x => x.PropertyTypes!)
        .Select(propType => 
        {
            // Ensure the requested variation is allowed on the property type
            if (culture != null) propType.Variations |= ContentVariation.Culture;
            if (segment != null) propType.Variations |= ContentVariation.Segment;
            
            return propType;
        })
        .ToDictionary(x => x.Alias);

Again, no idea if this is the actual fix or if it something completely different but this information may be of use so I thought I’d share.

Read more comments on GitHub >

github_iconTop Results From Across the Web

examine indexes not being rebuilt - General
Hi,. Just had some weird search results so I went to rebuild the indexes - testing first on a dev server and I...
Read more >
How To Rebuild Your Umbraco Examine Indexes
The easiest way to rebuild the index is to go into the backend, go to the settings tab, go to indexes and clear...
Read more >
Resolving Umbraco Examine cannot index queue ... - Piotr Bach
Recently, while working with Umbraco 8.6.0 deployed on Azure I encountered an Examine error: Cannot index queue items, the index is currently locked...
Read more >
Umbraco - Examine index not updated
Indexes should rebuild automatically when you publish/republish a content node. If it doesn't work, you may have configuration problem with ...
Read more >
Can I disable Examine indexes on Umbraco front-end ...
When indexes are rebuilt, the worker will query the database for the data and depending on how much data you have in your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found