Partilhar via


SortByProperty Element in Microsoft.Search.Query Schema

Applies to: SharePoint Server 2010

In this article
Attributes
Child Elements
Parent Elements
Element Information

<SortByProperty
name=managedProperty 
direction={Ascending|Descending}>
</SortByProperty>

Attributes

Attribute

Description

name

The name of the managed property to sort on.

The following special conditions apply to FAST Search Server 2010 for SharePoint only:

  • The name attribute may contain the name of a rank profile instead of a managed property. In this case the result set is sorted by Rank, but using the non-default rank profile specified by name. For more information, see Sort Search Results by Rank.

  • The name attribute may contain a sort formula specification. In this case the result set is sorted based on the specified formula. For more information about the syntax, see Sort Search Results by a Formula Expression.

direction

Specifies the direction (ascending or descending) to sort the results.

  • Ascending Sorting is based on ascending value

  • Descending Sorting is based on descending value

Note

This attribute is not used when specifying a rank profile name in the name attribute (rank sorting is always descending). This applies to FAST Search Server 2010 for SharePoint only.

The default value is Descending.

Child Elements

None.

Parent Elements

SortByProperties Element in Microsoft.Search.Query Schema

Remarks

If this element is not present, the results will be sorted by Rank.

Element Information

Schema name: Microsoft.Search.Query

Applies to: QueryService.Query method (Microsoft.Search.Response.Document), QueryService.QueryEx method (Dataset)

Optional: Yes

See Also

Reference

QueryService

Concepts

Using the Query Web Service

Walkthrough: Querying SharePoint Search From a Client Application