fix: Add path for unwind

This commit is contained in:
2025-03-20 16:02:48 +01:00
parent f802da2a3a
commit de3d318ae9
@@ -14,7 +14,7 @@ interface StationRepository : MongoRepository<Station, ObjectId> {
"{\$search: { index: \"stations\", returnStoredSource: true, compound: {must: [{phrase: {query: ?0, path: \"countryCode\"}},{autocomplete: {query: ?1,path: \"name\",tokenOrder: \"sequential\"}}]}}}", "{\$search: { index: \"stations\", returnStoredSource: true, compound: {must: [{phrase: {query: ?0, path: \"countryCode\"}},{autocomplete: {query: ?1,path: \"name\",tokenOrder: \"sequential\"}}]}}}",
"{\$limit: 10}", "{\$limit: 10}",
"{\$lookup: { from: \"station\", localField: \"_id\", foreignField: \"_id\", as: \"document\" }}", "{\$lookup: { from: \"station\", localField: \"_id\", foreignField: \"_id\", as: \"document\" }}",
"{\$unwind: \"\$document\"}", "{\$unwind: { path: \"\$document\"}}",
"{\$replaceWith: \"\$document\"}" "{\$replaceWith: \"\$document\"}"
]) ])
fun findAllByCountryCodeAndNameContainingIgnoreCase(countryCode: String, name: String): List<Station> fun findAllByCountryCodeAndNameContainingIgnoreCase(countryCode: String, name: String): List<Station>