title: Doing a search/loading custom results into ember store?
body: <p>Been doing some searching and reading the source code of ember-data but I'm having trouble figuring out how to do this. So my index page loads the data like so:</p>
  
  <pre><code>App.SaleRecordsRoute = Ember.Route.extend({
    setupController: function(controller) {
      controller.set('content', App.SaleRecord.find());
    }
  });
  </code></pre>
  
  <p>On the server, i simply respond with the latest 10 records. What i also want to do, is query the same url, passing a single search field. This search field or criteria is checked against a few fields in the database. These fields are across a couple different models in the join statement, so i don't think i can just do:</p>
  
  <pre><code>App.SaleRecord.find({ book.title: critera });
  </code></pre>
  
  <p>Book being the belongsTo record.</p>
  
  <p>In the controller for that route, here's what i have for querying the data at least, which works as expected:</p>
  
  <pre><code>App.SaleRecordsController = Ember.ArrayController.extend({
    search: function() {
      $.getJSON('/search?criteria=' + $('.criteria').val(), function(data) {
  
      });
    }
  });
  </code></pre>
  
  <p>But I'm unsure of what to do from here. </p>
  
  <ol>
  <li>If some of the records are already in the store due to being part of the last 10 results, do i need to unload them first? </li>
  <li>How do i load the data into the store from the json hash? I know how to create a record and populate it, so i can loop through the data, but i wonder if there's  one liner for it.</li>
  </ol>
  
  <p>Thanks. I hope the question was clear :)</p>