title: filtering results in solr
body: <p>I'm trying to build auto suggest functionality using Solr. The index contains different locations within a city and looks something like</p>
  
  <pre><code>id: unique id
  name: the complete name
  type: can be one of 'location_zone', 'location_subzone', 'location_city', 'outlet', 'landmark' ...
  city: city id
  </code></pre>
  
  <p>now when the user types something, I want it to return suggestion only from the current city and of type location_*. something similar to <code>WHERE city_id = 1 AND type="location_%"</code> in SQL.</p>
  
  <p>I guess one way to do it is by faceting but is that the right way? will it still search in all documents and then filter the results or will it apply the condition first as mysql would do it</p>
  
  <p>PS: I'm new to solr and would appreciate if you can point out any mistakes in the approach</p>