SearchModule
public class SearchModule
Provides functionality to search for content.
-
query(query:scope:fileExtensions:createdAfter:createdBefore:updatedAfter:updatedBefore:sizeAtLeast:sizeAtMost:ownerUserIDs:ancestorFolderIDs:searchIn:itemType:searchTrash:metadataFilter:fields:offset:limit:)Searches for items in Box.
Declaration
Swift
public func query( query: String?, scope: SearchScope? = nil, fileExtensions: [String]? = nil, createdAfter: Date? = nil, createdBefore: Date? = nil, updatedAfter: Date? = nil, updatedBefore: Date? = nil, sizeAtLeast: Int64? = nil, sizeAtMost: Int64? = nil, ownerUserIDs: [String]? = nil, ancestorFolderIDs: [String]? = nil, searchIn: [SearchContentType]? = nil, itemType: SearchItemType? = nil, searchTrash: Bool? = nil, metadataFilter: MetadataSearchFilter? = nil, fields: [String]? = nil, offset: Int? = nil, limit: Int? = nil ) -> PaginationIterator<FolderItem>Parameters
queryThe text to serach for.
scopeThe scope of content to search within; admins can serach within their entire enterprise.
fileExtensionsLimit the search to files with the given extensions.
createdAfterLimit the search to items created after this date.
createdBeforeLimit the search to items created before this date.
updatedAfterLimit the search to items updated after this date.
updatedBeforeLimit the search to items updated before this date.
sizeAtLeastLimit the search to items at least this size, in bytes.
sizeAtMostLimit the search to items at most this size, in bytes
ownerUserIDsLimit the search to only items owned by one of the specified users.
ancestorFolderIDsLimit the search to items within the specified folders. This includes all content under these folders, not just their immediate children.
searchInSpecifies the areas where the search should look for the query string.
itemTypeLimits the search to only items of the given type.
searchTrashWhether to search in the trash. The options are mutually exclusive; either
metadataFilterThe metadata template filters to limit the search results to. only trashed content or non-trashed content will be searched.
offsetThe offset within the collection of results to start from.
limitThe limit for how many search results will be returned.
completionCalled with the results of the search query, or an error if the request is unsuccessful.
SearchModule Class Reference