<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSearchFieldCell/maximumRecents",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSearchFieldCell(py)maximumRecents"
  },
  "title" : "maximumRecents"
}
-->

# maximumRecents

The maximum number of search strings that can appear in the search menu.

```
var maximumRecents: Int { get set }
```

## Discussion

The value of this property must be between `0` and `254`. Specifying a negative value for the property sets it to the default value, which is `10`. Specifying a value greater than `254` sets the property to `254`.

When the maximum number of search strings is exceeded, the oldest search string on the menu is dropped.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)