-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from mongodb-developer:main
Main
- Loading branch information
Showing
25 changed files
with
484 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Create the following atlas vector search index: | ||
|
||
// ========================== | ||
// named: vector_index | ||
// collection: recordings | ||
// ========================== | ||
{ | ||
"fields": [ | ||
{ | ||
"path": "Player.Nickname", | ||
"type": "filter" | ||
}, | ||
{ | ||
"numDimensions": 589, | ||
"path": "speed_vector", | ||
"similarity": "euclidean", | ||
"type": "vector" | ||
}, | ||
{ | ||
"numDimensions": 588, | ||
"path": "accel_vector", | ||
"similarity": "euclidean", | ||
"type": "vector" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
rest_service/Dtos/ResponseObjects/SimilarRecordingResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Newtonsoft.Json; | ||
using RestService.Entities; | ||
|
||
namespace RestService.Dtos.ResponseObjects; | ||
|
||
public class SimilarRecordingResponse | ||
{ | ||
[JsonProperty("_id")] | ||
public string? Id { get; set; } | ||
[JsonProperty("sessionStatisticsPlain")] | ||
public SessionStatisticsPlain? SessionStatisticsPlain { get; set; } | ||
[JsonProperty("name")] | ||
public string? Name { get; set; } | ||
|
||
public SimilarRecordingResponse(Recording recording) | ||
{ | ||
Id = recording.Id.ToString(); | ||
SessionStatisticsPlain = recording.SessionStatisticsPlain; | ||
Name = recording.Player.Name; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using MongoDB.Bson; | ||
using MongoDB.Bson.Serialization.Attributes; | ||
using Newtonsoft.Json; | ||
using RestService.Dtos.RequestObjects; | ||
|
||
namespace RestService.Entities; | ||
|
||
[SuppressMessage("ReSharper", "PropertyCanBeMadeInitOnly.Global")] | ||
[BsonIgnoreExtraElements] | ||
public class Player | ||
{ | ||
[BsonElement("_id")] public ObjectId? Id { get; set; } | ||
[BsonElement("Nickname")] public string? Name { get; set; } | ||
[BsonElement("TeamName")] public string? Team { get; set; } | ||
[BsonElement("Email")] public string? Email { get; set; } | ||
|
||
[JsonProperty("location")] | ||
[BsonElement("location")] | ||
public string? Location { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
using MongoDB.Bson; | ||
using MongoDB.Bson.Serialization.Attributes; | ||
using Newtonsoft.Json; | ||
|
||
namespace RestService.Entities; | ||
|
||
namespace RestService.Entities | ||
[BsonIgnoreExtraElements] | ||
public class PlayerUnique | ||
{ | ||
public class PlayerUnique | ||
{ | ||
[BsonId] | ||
[JsonProperty("Name")] | ||
public string Name { get; set; } | ||
[BsonId] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("location")] | ||
[BsonElement("location")] | ||
public string? Location { get; set; } | ||
} | ||
[BsonElement("location")] | ||
public string? Location { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using MongoDB.Bson.Serialization.Attributes; | ||
|
||
namespace RestService.Entities; | ||
|
||
[SuppressMessage("ReSharper", "PropertyCanBeMadeInitOnly.Global")] | ||
[BsonIgnoreExtraElements] | ||
public class Position | ||
{ | ||
public float X { get; set; } | ||
public float Y { get; set; } | ||
public float Z { get; set; } | ||
public double X { get; set; } | ||
public double Y { get; set; } | ||
public double Z { get; set; } | ||
} |
Oops, something went wrong.