title: Search Feature Parse IOS
body: <p>I would like to make a search feature that queries two different key from the same class.  What kind of regular expression could I use that return the most accurate values. Example:</p>
  
  <pre><code> - (void)searchTableList {
  
  [self.results removeAllObjects];
  
  PFQuery *query = [PFQuery queryWithClassName:@"TC"];
  
  
  CLLocationCoordinate2D coordinate = [self.delegate.location coordinate];
  PFGeoPoint *geoPoint = [PFGeoPoint geoPointWithLatitude:coordinate.latitude
                                                longitude:coordinate.longitude];
  
  PFQuery *query1 = [PFQuery queryWithClassName:@"TC"];
  
  [query1 setLimit:1000];
  [query1 whereKey:@"location"
     nearGeoPoint:geoPoint
  withinKilometers:5];
    [query1 whereKey:@"courses" matchesRegex:[NSString stringWithFormat:@"%@",[self.searchBar.text    lowercaseString]]];
  
   [query1 whereKey:@"owner" notEqualTo:[PFUser currentUser].username];
   [query1 findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
     for( PFObject * object in objects)
     {
         [self.results addObject:object];
     }
   [query setLimit:1000];
   [query whereKey:@"location"
     nearGeoPoint:geoPoint
     withinKilometers:5];
       [query whereKey:@"owner" matchesRegex:[NSString stringWithFormat:@"%@",[self.searchBar.text lowercaseString]]];
  
     [query whereKey:@"owner" notEqualTo:[PFUser currentUser].username];
    [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
      for( PFObject * object in objects)
      {
          [self.results addObject:object];
      }
  
  
     [self.tableView reloadData];
  }];
  
  
  }];
  }
  </code></pre>
  
  <p>How could I take these two queries and order them in such a way that the most accurate information has priority.</p>