Inherits from NSCompoundPredicate
Declared in RKSearchPredicate.h

Overview

RKSearchPredicate is a suclass of NSCompoundPredicate used to represent textual search operations against entities indexed by an instance of RKSearchIndexer.

Tasks

Creating a Search Predicate

  • + searchPredicateWithText:type:

    Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

  • – initWithSearchText:type:

    Initializes the receiver with a string of search text and a compound predicate type.

Class Methods

searchPredicateWithText:type:

Creates and returns a new predicate for performing a full text search on an entity indexed by an instance of RKSearchIndexer. The given search text will be tokenized, normalized and used to construct a collection of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

+ (NSPredicate *)searchPredicateWithText:(NSString *)searchText type:(NSCompoundPredicateType)type

Parameters

searchText

A string of text with which to construct subpredicates for searching.

type

The type of the new compound predicate.

Return Value

A new compound predicate for performing a full text search with the given search text and type.

Declared In

RKSearchPredicate.h

Instance Methods

initWithSearchText:type:

Initializes the receiver with a string of search text and a compound predicate type.

- (id)initWithSearchText:(NSString *)searchText type:(NSCompoundPredicateType)type

Parameters

searchText

A string of text with which to construct subpredicates for searching.

type

The type of the new compound predicate.

Return Value

The receiver with its type set to the given type and its subpredicates set to an array of subpredicates for searching for the given text.

Discussion

The search text will be tokenized, normalized and then used to construct an array of subpredicates specifying a BEGINSWITH match against the searchWords relationship of the searchable entity.

Declared In

RKSearchPredicate.h