Copied to clipboard

Flag this post as spam?

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


  • Mus'ab 155 posts 380 karma points notactivated
    Dec 04, 2019 @ 14:45
    Mus'ab
    0

    How to order examine results by date time property ?

    Hi

    i am trying to order examine results based on date time property like bellow

     if (ExamineManager.Instance.TryGetIndex("ExternalIndex", out var index))
            {
                var searcher = index.GetSearcher();
                ISearchResults results = null;
                results = searcher.CreateQuery()
                                .Field("path", newsSource.Path.ToString().MultipleCharacterWildcard()).And()
                                .Field("__IndexType", "content")
                                .And().Field("__NodeTypeAlias", "newsItem").And().Field("disabled","0")
                                .OrderByDescending(new SortableField[] { new SortableField("publish_time") }).Execute();
    

    but i think that didn't work a already changed the index type of property from text string to date time but i still get the results without ordering.

    any idea ?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies