Copied to clipboard

Flag this post as spam?

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

  • Andrej 2 posts 72 karma points
    14 days ago

    Problems with Examine search in Umbraco v8.3


    I have problems with Examine search. Inside document type i created category dropdown where user can choose category for each news. Then on the news page user can choose category for which he wants to display the news. For this search examine is used. When looking for specific category with examine ("collection of news") there are no hits. But if i publish news page (or any other content) again examine starts working and displays all the news with this category. Everything is working until next day, then problem appears again.

    Until recent everything was working OK. Application is in production environment couple of months already. New category was added one month ago and problems started to appear.

    What is also strange is that if i use Umbraco backoffice examine search, everything works OK.

    I read on the forum that settings on load balanced environment could be the problem, but i double checked everything and it looks OK. The problem also appears in iis express when debugging so i believe this is not the case.

    I also deleted data from TEMP folder but this doesn't help until something is published.

    Does publishing content in Umbraco triggers some special functions regarding Examine?

  • Andrej 2 posts 72 karma points
    3 days ago

    Code used for examine search. Any help would be really appreciated.

            ExamineManager.Instance.TryGetIndex("InternalIndex", out var index);
            var searchProvider = index.GetSearcher();
            var query = searchProvider.CreateQuery(string.Empty, BooleanOperation.And).Field("__NodeTypeAlias", contentType);
            //Only published items
            query.And().Field("__Published_" + userLanguage, "y");
            //Only specific category
            if (!string.IsNullOrEmpty(category))
                query.And().Field("category_" + userLanguage, category);
            //Don't search specific node id 
            if (excludeContentId != 0)
                query.Not().Field("__NodeId", excludeContentId.ToString());
            query.OrderByDescending(new SortableField("date_" + userLanguage, SortType.Double));
            var pagedResults = query.Execute(maxResults: pageSize * (pageIndex + 1)).Skip(pageIndex * pageSize);

    Examine code works after publish until next day.

    What is functionality of publish event that forces Examine to start working?

Please Sign in or register to post replies

Write your reply to: