SYFlatDataSearch Class Reference

Performs search in SYSearchFlatDataItem objects. More...

#import <SYSearch.h>

Inheritance diagram for SYFlatDataSearch:
Collaboration diagram for SYFlatDataSearch:

Instance Methods

(nonnull instancetype) - initWithPriority:
 Creates SYFlatDataSearch. More...
 
(nonnull instancetype) - init
 
(NSUInteger) - addItem:
 Add searchable item. More...
 
(nonnull NSArray< NSNumber * > *) - addItems:
 Add searchable items. More...
 
(void) - removeItemWithId:
 Remove searchable item. More...
 
(void) - removeItemsWithIds:
 Remove searchable items. More...
 
(void) - removeAllItems
 Remove all searchable items. More...
 
- Instance Methods inherited from SYSearchBase
((unavailable("Only subclasses can be instantiated.") - __attribute__
 
(nonnull SYSearchSession *) - startNewSession
 Creates a new search session associated with this search instance. More...
 

Class Methods

(nonnull instancetype) + new
 
- Class Methods inherited from SYSearchBase
((unavailable("Only subclasses can be instantiated.") + __attribute__
 

Detailed Description

Performs search in SYSearchFlatDataItem objects.

Method Documentation

◆ initWithPriority:

- (nonnull instancetype) initWithPriority: (float)  priority

Creates SYFlatDataSearch.

Parameters
priorityValue from 0 to 1, representing priority of search results found by this search instance comparing to other SYFlatDataSearch instances. The bigger value, the higher search result will be in the list (comparing to results from other SYFlatDataSearch).

◆ init

- (nonnull instancetype) init

◆ new

+ (nonnull instancetype) new

◆ addItem:

- (NSUInteger) addItem: (nonnull SYSearchFlatDataItem *)  item

Add searchable item.

Returns
ID of the added item, it can be used to remove this item later.

◆ addItems:

- (nonnull NSArray<NSNumber*>*) addItems: (nonnull NSArray< SYSearchFlatDataItem * > *)  items

Add searchable items.

Parameters
itemsArray of searchable items to be added to search engine.
Returns
Array of IDs of the added items. IDs can be used to remove these items later.

◆ removeItemWithId:

- (void) removeItemWithId: (NSUInteger)  itemId

Remove searchable item.

Parameters
itemIdID of the item which must be removed. Initially item ID is returned by addItem method.

◆ removeItemsWithIds:

- (void) removeItemsWithIds: (nonnull NSArray< NSNumber * > *)  itemIds

Remove searchable items.

Parameters
itemIdsIDs of the items which must be removed. Initially item ID is returned by addItem method.

◆ removeAllItems

- (void) removeAllItems

Remove all searchable items.


The documentation for this class was generated from the following file: