---
title: maxRankedResultCount
framework: corespotlight
role: symbol
role_heading: Instance Property
path: corespotlight/csuserquerycontext/maxrankedresultcount
---

# maxRankedResultCount

The maximum number of ranked results to return during the query.

## Declaration

```swift
var maxRankedResultCount: Int { get set }
```

## Discussion

Discussion Spotlight ranks a limited number of results by default, but you can change the default value to improve performance or better suit your app’s interface. For example, you might want to return only the five most relevant results due to space constraints in your UI.

## See Also

### Configuring the ranked results behavior

- [enableRankedResults](corespotlight/csuserquerycontext/enablerankedresults.md)
