YapDatabaseSearchResultsView

@interface YapDatabaseSearchResultsView : YapDatabaseAutoView

Welcome to YapDatabase!

https://github.com/yapstudios/YapDatabase

The project wiki has a wealth of documentation if you have any questions. https://github.com/yapstudios/YapDatabase/wiki

YapDatabaseSearchResults allows you to pipe search results from YapDatabaseFullTextSearch into a YapDatabaseView. This makes it easy to display search results in a tableView or collectionView.

  • In this configuration, you want to search an existing YapDatabaseView, and you have a YapDatabaseFullTextSearch extension with which to do it.

    The search results will be a union of those items that match the search, and those items in the existing YapDatabaseView.

    The search results will be grouped and sorted in the same manner as the parent YapDatabaseView. This is conceptually similar to a YapDatabaseFilteredView, where the filterBlock is automatically created according to the search parameter(s).

    Extended options for the extension. You may pass nil to get the default extended options.

    Declaration

    Objective-C

    - (nonnull id)
        initWithFullTextSearchName:(nonnull NSString *)fullTextSearchName
                    parentViewName:(nonnull NSString *)parentViewName
                        versionTag:(nullable NSString *)versionTag
                           options:(nullable YapDatabaseSearchResultsViewOptions *)
                                       options;

    Swift

    init(fullTextSearchName: String, parentViewName: String, versionTag: String?, options: YapDatabaseSearchResultsViewOptions?)

    Parameters

    fullTextSearchName

    The registeredName of a YapDatabaseFullTextSearch extension. The fts extension must already be registered with the database system.

    parentViewName

    The registeredName of a YapDatabaseView extension. The view extension must already be registered with the database system.

    versionTag

    The standard versionTag mechanism.

  • In this configuration, you want to pipe search results directly into a new YapDatabaseView. That is, there is not an existing YapDatabaseView you want to search. Rather, you simply want to perform a search using a YapDatabaseFullTextSearch extension, and then provide a groupingBlock / sortingBlock in order to present the results.

    For more information on the groupingBlock & sortingBlock parmaters, please see the documentation in YapDatabaseView.h.

    Declaration

    Objective-C

    - (nonnull id)
        initWithFullTextSearchName:(nonnull NSString *)fullTextSearchName
                          grouping:(nonnull YapDatabaseViewGrouping *)grouping
                           sorting:(nonnull YapDatabaseViewSorting *)sorting
                        versionTag:(nullable NSString *)versionTag
                           options:(nullable YapDatabaseSearchResultsViewOptions *)
                                       options;

    Swift

    init(fullTextSearchName: String, grouping: YapDatabaseViewGrouping, sorting: YapDatabaseViewSorting, versionTag: String?, options: YapDatabaseSearchResultsViewOptions?)

    Parameters

    fullTextSearchName

    The registeredName of a YapDatabaseFullTextSearch extension. The fts extension must already be registered with the database system.

    grouping

    The groupingBlock is used to place search results into proper sections. The block may also be used to perform secondary filtering.

    sorting

    The sortingBlock is used to sort search results within their respective sections.

    versionTag

    The standard versionTag mechanism.

    options

    Extended options for the extension. You may pass nil to get the default extended options.

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *fullTextSearchName

    Swift

    var fullTextSearchName: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *parentViewName

    Swift

    var parentViewName: String { get }