title: How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar
body: <p>I'm trying to implement search code in my CoreData-based iPhone app.  I'm not sure how to proceed.  The app already has an NSFetchedResultsController with a predicate to retrieve the data for the primary TableView.  I want to make sure I'm on the right path before I change too much code.  I'm confused because so many of the examples are array-based instead of CoreData.</p>
  
  <p>Here are some questions:</p>
  
  <ol>
  <li><p>Do I need to have a second NSFetchedResultsController that retrieves only the matching items or can I use the same one as the primary TableView?</p></li>
  <li><p>If I use the same one, is it as simple as clearing the FRC cache and then changing the predicate in the handleSearchForTerm:searchString method?  Does the predicate have to contain the initial predicate as well as the search terms or does it remember that it used a predicate to retrieve data in the first place?</p></li>
  <li><p>How do I get back to the original results?  Do I just set the search predicate to nil?  Won't that kill the original predicate that was used to retrieve the FRC results in the first place?</p></li>
  </ol>
  
  <p>If anyone has any examples of code using search with the FRC, I would greatly appreciate it!</p>