Skip to content

Commit

Permalink
Modified features query so it would use the index and run faster by r…
Browse files Browse the repository at this point in the history
…estructuring it (more apparent on larger DBs). (#51)
  • Loading branch information
matt-thurling authored and steveswinsburg committed Mar 4, 2018
1 parent eb644f1 commit 946d03b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/xbdd/webapp/resource/feature/Feature.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public DBObject getFeatureRollup(@BeanParam final Coordinates coordinates, @Path
public DBObject getFeature(@BeanParam final Coordinates coordinates, @PathParam("featureId") final String featureId) {
final DB db = this.client.getDB("bdd");
final DBCollection tips = db.getCollection("features");
final BasicDBObject example = new BasicDBObject().append("id", featureId).append("coordinates", coordinates.getReportCoordinates());
final BasicDBObject example = coordinates.getReportCoordinatesQueryObject().append("id", featureId);
final DBObject feature = tips.findOne(example);
if (feature != null) {
Feature.embedTestingTips(feature, coordinates, db);
Expand Down

0 comments on commit 946d03b

Please sign in to comment.