This article will help you to get the search result from SharePoint if you are using ORDER BY in your query.
Generally creating a search site in SharePoint is quite easy. You can search default values from scope.
SELECT Title, SiteName, Path FROM Scope()
In this condition you will get result correctly.
But think about below query:
SELECT Rank,Title,CreatedBy, Path,Size,FROM SCOPE() ORDER BY Title
In this condition you will get blank result. Means ORDER BY will not work here.
Suppose you want to enhance your search result. For ex. if you want to get result in sorted order by a specific column, In this condition you will not get your search result. For this you need to made small change in meta data property.
To get the result by using ORDER BY clause in your query do the below steps:
Central Administration --> Search Service Application --> Metadata Properties --> Select your Meta Data Property->Edit Managed Property.
Now please tick the option, "Reduce storage requirements for text properties by using a hash for comparison".
After this perform the query by using ORDER BY clause and see the result.