---
title: enableRankedResults
framework: corespotlight
role: symbol
role_heading: Instance Property
path: corespotlight/csuserquerycontext/enablerankedresults
---

# enableRankedResults

A Boolean value that indicates whether the query sorts results by their relevance.

## Declaration

```swift
var enableRankedResults: Bool { get set }
```

## Discussion

Discussion The default value of this property is true. Setting the property to false causes Spotlight to return results as it finds them instead of ordering them by their relevance or saliency to the search term.

## See Also

### Configuring the ranked results behavior

- [maxRankedResultCount](corespotlight/csuserquerycontext/maxrankedresultcount.md)
