Try our conversational search powered by Generative AI!

Orderby on Displayname



When using OrderBy in a Find Query:

 query = query.OrderBy(x => x.DisplayName);

We're seeing results like this:

1. bed & onderschuifbed Doppia

2. box Ambra vlak - 2-persoons

When we would like the Ambra to be above the "bed & onderschuifbed". Is this because of the ampersand? And how can we get Find to order this by alphanumeric only (if that's a solution in this case)



Feb 05, 2018 11:58

Hi Mark 

I suspect the ordering is because of the &. If you wanted more control of the ordering you could add an IncludeField convention to add a custom DisplayNameOrder field to the index then order by that. The DisplayNameOrder() delegate method can then parse/remove items from the display name to allow you to fully control the ordering. 

More information:


Feb 05, 2018 21:34

Hi David,

Thanks for your response. I will look at your suggestions.


Feb 06, 2018 8:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.