Gravatar for achmedrauff.abdulrahim@3ds.com

Question by Achmed Rauff, Feb 12, 2015 1:29 AM

How can I set the default sort instead of Relevence to Date in v7 Enterprise.

I have an interface that is used specifically for a source. The owner wants the results to load by default by Date instead of Relevance. How can I do this?

Gravatar for slangevin@coveo.com

Comment by Simon, Feb 12, 2015 9:09 AM

For the .Net or JavaScript interface?

Gravatar for achmedrauff.abdulrahim@3ds.com

Comment by Achmed Rauff, Feb 16, 2015 12:26 AM

.net please :)

Gravatar for achmedrauff.abdulrahim@3ds.com

Comment by Achmed Rauff, Feb 16, 2015 4:14 AM

I have found the solution from here:

https://developers.coveo.com/display/searchdotnet/Customizing+the+Default+Sort+Order+of+Search+Results

1 Reply
Gravatar for mlaporte@coveo.com

Answer by Martin Laporte, Feb 12, 2015 4:03 AM

You can set a default sort for a Tab using the sort option. Something like this:

<a class="CoveoTab" data-caption="..." data-sort="date ascending"></a>

Gravatar for achmedrauff.abdulrahim@3ds.com

Comment by Achmed Rauff, Feb 16, 2015 2:32 AM

Exactly in which file of the interface .ascx should this be used?

Gravatar for mlaporte@coveo.com

Comment by Martin Laporte, Feb 16, 2015 3:57 AM

My answer was for the JS UI. For .NET, this page might be of help: https://developers.coveo.com/display/searchdotnet/Customizing+the+Default+Sort+Order+of+Search+Results

Ask a question