Examine - Order results by multiple property fields?
So I have a simple query along the lines of: var results = searcher.Search(criteria.Range(...).And().Field("nodeTypeAlias","someType").And().OrderBy("date").Compile());
Can I order my results by multiple criteria?? eg. first by 'name' then by 'date'?
Alternatively, is there a way to flag a property as having a higher priority so that when checked as true it's returned (sorted) at the start of the results list? eg. say I have an Event with property flagEvent(true/false)
Examine - Order results by multiple property fields?
So I have a simple query along the lines of:
var results = searcher.Search(criteria.Range(...).And().Field("nodeTypeAlias","someType").And().OrderBy("date").Compile());
Can I order my results by multiple criteria?? eg. first by 'name' then by 'date'?
Alternatively, is there a way to flag a property as having a higher priority so that when checked as true it's returned (sorted) at the start of the results list? eg. say I have an Event with property flagEvent(true/false)
Well, looks like .And().OrderByDescending("priority").And().OrderBy("date") worked :)
Keep forgetting that EnableSorting="true" config!
is working on a reply...