Copied to clipboard

Flag this post as spam?

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


  • blackhawk 313 posts 1368 karma points
    Oct 05, 2017 @ 22:21
    blackhawk
    0

    Sort Order for SortableField via Examine

    ...How can I sort the nodeTypeAlias to output results in reverse order of what is being presented here?

     var query= searchCriteria.RawQuery(term).OrderBy(new SortableField("nodeTypeAlias", SortType.Double)).Compile();
    

    When searching for a term that is in both a media document and a content node, my examine results displays like this....

    content page
    content page
    content page
    file
    

    ...but I also want to learn how to sort the order in this way...

    file
    content page
    content page
    content page
    

    Thanks for any ideas

  • Tobias Klika 101 posts 570 karma points c-trib
    Oct 07, 2017 @ 10:46
    Tobias Klika
    100

    Use OrderByDescending instead of OrderBy ;-)

  • blackhawk 313 posts 1368 karma points
    Oct 10, 2017 @ 17:09
    blackhawk
    0

    I learned this as well as the importance of enabling sort on my name properties within the ExamineIndex.config file.

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft