_CoreSpotlight_FoundationModels · IOS API REFERENCE
SpotlightSearchTool.GuidanceProfile
struct · iOS 27.0+ · SDK 27.1
struct GuidanceProfile
Options for which techniques to use to determine a match.
When you configure the ``SpotlightSearchTool`` with the ``SpotlightSearchTool/GuidanceLevel/dynamic(_:)``
guidance option, you provide an instance of this structure. Configure the structure with the search
techniques you want to allow or disallow, and might do so to prevent searches using techniques that
don’t apply to your content. If you don’t specify a value for a property, the tool doesn’t use that search option.
In addition to specifying what types of searches to perform, you can also specify which of your content’s
attributes to consider when looking for matches. The default behavior searches all of the attributes present
for your content, but you can specify a custom set of attributes if you want the tool to ignore certain values.
Members (15)
get · iOS 27.0+
attributes
TypeScript
get attributes(): (Array<_CoreSpotlight_SearchableItemAttribute>) | null
Swift declaration
var attributes: [SearchableItemAttribute]?
The relevant attributes from your content that you want to search.
Use this property to specify only the attributes that are relevant for your content. If you
provide a value for this property, the search tool considers only the attributes you specify.
If you don’t specify a value for this property, or set the value to `nil`, all attributes
are available during searches.
set · iOS 27.0+
attributes
TypeScript
set attributes(value: (Array<_CoreSpotlight_SearchableItemAttribute>) | null)
Swift declaration
var attributes: [SearchableItemAttribute]?
The relevant attributes from your content that you want to search.
Use this property to specify only the attributes that are relevant for your content. If you
provide a value for this property, the search tool considers only the attributes you specify.
If you don’t specify a value for this property, or set the value to `nil`, all attributes
are available during searches.
get · iOS 27.0+
contentType
TypeScript
get contentType(): (boolean) | null
Swift declaration
var contentType: Bool?
A Boolean value that indicates whether to determine matches using an item’s type.
Set the value of this property to `true` to give the model the option to match items based on their
``CSSearchableItemAttributes/contentType`` attribute. If you don’t specify a value for this property,
the default value is `false`.
set · iOS 27.0+
contentType
TypeScript
set contentType(value: (boolean) | null)
Swift declaration
var contentType: Bool?
A Boolean value that indicates whether to determine matches using an item’s type.
Set the value of this property to `true` to give the model the option to match items based on their
``CSSearchableItemAttributes/contentType`` attribute. If you don’t specify a value for this property,
the default value is `false`.
get · iOS 27.0+
numericMatch
TypeScript
get numericMatch(): (boolean) | null
Swift declaration
var numericMatch: Bool?
A Boolean value that indicates whether to determine matches using numerical values.
Set the value of this property to `true` to give the model the option to compare numerical values. For example,
you might enable this option if your content contains Boolean attributes, star ratings, or any other
attributes with numerical values. If you don’t specify a value for this property, the default value is `false`.
set · iOS 27.0+
numericMatch
TypeScript
set numericMatch(value: (boolean) | null)
Swift declaration
var numericMatch: Bool?
A Boolean value that indicates whether to determine matches using numerical values.
Set the value of this property to `true` to give the model the option to compare numerical values. For example,
you might enable this option if your content contains Boolean attributes, star ratings, or any other
attributes with numerical values. If you don’t specify a value for this property, the default value is `false`.
get · iOS 27.0+
similarityMatch
TypeScript
get similarityMatch(): (boolean) | null
Swift declaration
var similarityMatch: Bool?
A Boolean value that indicates whether to perform semantic similarity matching on your content.
Set the value of this property true `true` to give the model the option to perform semantic searches of
content. This approach allows the search to return results that match the intent of the provided string
and not just the actual search term. For example, if model performs a semantic match against the word
"star", the tool can match items that contain the text "star", "sun", or "Betelgeuse". If you don’t specify
a value for this property, the default value is `false`.
set · iOS 27.0+
similarityMatch
TypeScript
set similarityMatch(value: (boolean) | null)
Swift declaration
var similarityMatch: Bool?
A Boolean value that indicates whether to perform semantic similarity matching on your content.
Set the value of this property true `true` to give the model the option to perform semantic searches of
content. This approach allows the search to return results that match the intent of the provided string
and not just the actual search term. For example, if model performs a semantic match against the word
"star", the tool can match items that contain the text "star", "sun", or "Betelgeuse". If you don’t specify
a value for this property, the default value is `false`.
get · iOS 27.0+
dates
TypeScript
get dates(): (boolean) | null
Swift declaration
var dates: Bool?
A Boolean value that indicates whether to determine matches using date or time values.
Set the value of this property to `true` to give the model the option to filter results based on date or time
values. For example, you might enable this option if your items contain a start date or end date. If you
don’t specify a value for this property, the default value is `false`.
set · iOS 27.0+
dates
TypeScript
set dates(value: (boolean) | null)
Swift declaration
var dates: Bool?
A Boolean value that indicates whether to determine matches using date or time values.
Set the value of this property to `true` to give the model the option to filter results based on date or time
values. For example, you might enable this option if your items contain a start date or end date. If you
don’t specify a value for this property, the default value is `false`.
get · iOS 27.0+
people
TypeScript
get people(): (boolean) | null
Swift declaration
var people: Bool?
A Boolean value that indicates whether to determine matches using the presence of specific people.
Set the value of this property to `true` to give the model the option to match values based on references
to people. For example, you might enable this option to match items with a specific creator or author
value. If you don’t specify a value for this property, the default value is `false`.
set · iOS 27.0+
people
TypeScript
set people(value: (boolean) | null)
Swift declaration
var people: Bool?
A Boolean value that indicates whether to determine matches using the presence of specific people.
Set the value of this property to `true` to give the model the option to match values based on references
to people. For example, you might enable this option to match items with a specific creator or author
value. If you don’t specify a value for this property, the default value is `false`.
A Boolean value that indicates whether to perform keyword-based text matching on your content.
Set the value of this property is `true` to give the model the option to perform lexical matching on
text content. If you don’t specify a value for this property, the default value is `false`.
set · iOS 27.0+
textMatch
TypeScript
set textMatch(value: (boolean) | null)
Swift declaration
var textMatch: Bool?
A Boolean value that indicates whether to perform keyword-based text matching on your content.
Set the value of this property is `true` to give the model the option to perform lexical matching on
text content. If you don’t specify a value for this property, the default value is `false`.