Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • anthony hall 222 posts 535 karma points
    Jun 30, 2021 @ 13:56
    anthony hall

    Examine returns no results

    I'm using the following code to query examine in my Umbraco 8 website.

    if (!ExamineManager.Instance.TryGetIndex(global::Umbraco.Core.Constants.UmbracoIndexes.ExternalIndexName, out var index))
                    throw new InvalidOperationException($"No index found with name");
                var searcher = index.GetSearcher();
                var results = searcher.CreateQuery("content").NodeTypeAlias("investorReport").Execute();

    The above code returns no results. However, when I enter the generated lucene in the backoffice I have multiple results.

    +__IndexType:content +__NodeTypeAlias:investorreport

    I've published, rebuild the indexes. What I am missing here. I'm using the most recent version of examine.

    enter image description here

  • anthony hall 222 posts 535 karma points
    Jul 02, 2021 @ 11:33
    anthony hall

    On further investigation, I noticed that the external index in App Data was not regenerating. The application had the following setting on the web. config that was updating. For local development I removed this value and it worked.

    <add key="Umbraco.Examine.LuceneDirectoryFactory" value="Examine.LuceneEngine.Directories.TempEnvDirectoryFactory, Examine" />

    I believe this is required for load-balancing on Azure.

Please Sign in or register to post replies

Write your reply to: