Essentially examine will sort by string by default, eg return "10" before "2" for a numerical field, but if you tell it via the examine configuration that the index item is of type INT, and enablesorting on it, (same for datetime too) then you should be able to achieve the result you are after.
examine custom sort results based on integer
I would like to accomplish the following and simply would like to know if it's possible through Umbraco 7.
(1) Attach a custom property editor to each content node that holds a custom integer ranging from 1 to 100.
(2) Through examine search results, sort results in ascending order based on that integer value.
is this possible?
Hi blackhawk
Yes, have a look at the examine documentation for sorting here:
https://github.com/Shazwazza/Examine/wiki/Sorting-results
Essentially examine will sort by string by default, eg return "10" before "2" for a numerical field, but if you tell it via the examine configuration that the index item is of type INT, and enablesorting on it, (same for datetime too) then you should be able to achieve the result you are after.
and query
regards
Marc
Thank you! This works for me.
is working on a reply...