Pergunta

I can't seem to get an integer field to sort correctly.

I have the field defined with a Sort of int:

enter image description here

When I query it in the management studio by this field descending, the results sort correctly:

enter image description here

However, my understanding is when using OrderByDescending using LINQ in .NET, it will use the MaximumReach_Range field, which I've confirmed in Fiddler:

enter image description here

But when I sort by that in the Management Studio or call OrderByDescending using LINQ in .NET, the order is wrong:

enter image description here

I'm fairly sure that it's an issue with how the field is set up in the index, but I'm not sure which aspect outside of the Sort value needs to be changed.

Foi útil?

Solução

The key was in the Indexing value for the field, it must be set to Default in order for the range field to be set up correctly for integer sorting.

enter image description here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top