Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
...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
Use OrderByDescending instead of OrderBy ;-)
OrderByDescending
OrderBy
I learned this as well as the importance of enabling sort on my name properties within the ExamineIndex.config file.
ExamineIndex.config
Thanks!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Sort Order for SortableField via Examine
...How can I sort the nodeTypeAlias to output results in reverse order of what is being presented here?
When searching for a term that is in both a media document and a content node, my examine results displays like this....
...but I also want to learn how to sort the order in this way...
Thanks for any ideas
Use
OrderByDescending
instead ofOrderBy
;-)I learned this as well as the importance of enabling sort on my name properties within the
ExamineIndex.config
file.Thanks!
is working on a reply...