diff --git a/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs b/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs index e534233..c27ca51 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs @@ -19,21 +19,14 @@ namespace AIAHTML5.API.Models var col = db.GetCollection("DAImages"); - var pipeline = new BsonDocument[] - { - new BsonDocument{ {"$match", new BsonDocument("terms.SystemNumbers", Convert.ToInt32(systemNumber)) }}, - new BsonDocument{{"$unwind", "$terms"}}, - new BsonDocument{ { "$match", new BsonDocument("terms.SystemNumbers", Convert.ToInt32(systemNumber)) }}, - new BsonDocument{ { "$match", new BsonDocument("bodyViewIndex", Convert.ToInt32(bodyViewIndex)) }}, - new BsonDocument{ { "$match", new BsonDocument("layerNumber", Convert.ToInt32(layerNumber)) }}, - new BsonDocument{ { "$match", new BsonDocument("zoom", Convert.ToInt32(zoom)) }}, - - new BsonDocument { {"$project", new BsonDocument() - .Add("_id", 0) - .Add("terms", 1) - .Add("bodyRegionId", 1) - .Add("layerNumber", 1) - .Add("bodyViewIndex", 1) + var pipeline = new BsonDocument[] + { + new BsonDocument{{"$unwind", "$terms"}}, + new BsonDocument{ { "$match", new BsonDocument("terms.SystemNumbers", Convert.ToInt32(systemNumber)).Add("bodyViewIndex", Convert.ToInt32(bodyViewIndex)).Add("layerNumber", Convert.ToInt32(layerNumber)).Add("zoom", Convert.ToInt32(zoom)) }}, + new BsonDocument { {"$project", new BsonDocument() + .Add("_id", 0) + .Add("terms", 1) + .Add("bodyRegionId", 1) } } };