MRSearch Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | MRSearch.h |
Overview
Describes a search to be performed on Meridian servers. After configuring the search, you call startWithCompletionHandler:
to asynchonously perform the search.
searching
Returns YES if the search is currently being performed.
@property (nonatomic, readonly, getter=isSearching) BOOL searchingDeclared In
MRSearch.h
– initWithRequest:
The designated initializer. The request will be copied during initialization, so any changes made to the request
after this method returns do not affect the request used in startWithCompletionHandler:.
- (instancetype)initWithRequest:(MRSearchRequest *)requestParameters
request |
The request object containing the details of this search. |
|---|
Declared In
MRSearch.h
– startWithCompletionHandler:
Starts the asynchronous search operation.
- (void)startWithCompletionHandler:(MRSearchCompletionHandler _Nullable)completionHandlerParameters
completionHandler |
A block to run after each page of a search request is processed. |
|---|
Discussion
Any calls to startWithCompletionHandler: while [MRSearch isSearching] will fail.
The completionHandler block may be called multiple times if results are paginated.
The block will be called on the main queue and takes two parameters:
resultscontains the search results, ornilif an error occurred.errorcontains the error information if one occured, ornilif the search was successful.
Declared In
MRSearch.h
– startWithCompletionHandler:finishedHandler:
Starts the asynchronous search operation.
- (void)startWithCompletionHandler:(MRSearchCompletionHandler _Nullable)completionHandler finishedHandler:(MRSearchFinishedHandler _Nullable)finishedHandlerParameters
completionHandler |
A block to run after each page of a search request is processed. |
|---|---|
finishedHandler |
A block to run when the search finishes. |
Discussion
Any calls to startWithCompletionHandler:finishedHandler: while [MRSearch isSearching] will fail.
The completionHandler block may be called multiple times if results are paginated.
The block will be called on the main queue and takes two parameters:
resultscontains the search results, ornilif an error occurred.errorcontains the error information if one occured, ornilif the search was successful.
The ‘finishedHandler’ block will be called only once after all pages are loaded without error. The block will be called on the main queue and takes no parameters
Declared In
MRSearch.h