@exabugs/dynamodb-client 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/server/handler.cjs +31 -5
- package/dist/server/handler.cjs.map +2 -2
- package/dist/server/operations/find/nearQuery.d.ts.map +1 -1
- package/dist/server/operations/find/nearQuery.js +32 -4
- package/dist/server/operations/find/nearQuery.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.7] - 2026-01-02
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **$nearクエリのシャドーレコード検索**: SKプレフィックスパターンを修正
|
|
15
|
+
- 修正前: `${fieldName}#${geohashPrefix}` → 修正後: `${fieldName}#${geohashPrefix}#id#`
|
|
16
|
+
- シャドーレコードのSKパターン `location#<geohash>#id#<venue-id>` に正しく対応
|
|
17
|
+
- これにより、$nearクエリが正常に動作し、距離順にソートされた開催地一覧を取得可能に
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **$nearクエリのデバッグログ**: 各ステップでログを出力して問題追跡を容易に
|
|
22
|
+
- シャドーレコード検索時のSKプレフィックスをログ出力
|
|
23
|
+
- 検索結果の件数をログ出力
|
|
24
|
+
- 本体レコード取得時のIDリストをログ出力
|
|
25
|
+
|
|
10
26
|
## [1.3.6] - 2026-01-02
|
|
11
27
|
|
|
12
28
|
### Fixed
|
package/dist/server/handler.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// @exabugs/dynamodb-client v1.3.
|
|
2
|
-
// Built: 2026-01-02T13:
|
|
1
|
+
// @exabugs/dynamodb-client v1.3.7
|
|
2
|
+
// Built: 2026-01-02T13:40:18.082Z
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -30500,6 +30500,13 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30500
30500
|
const searchFunction = /* @__PURE__ */ __name(async (geohashPrefix) => {
|
|
30501
30501
|
const dbClient2 = getDBClient();
|
|
30502
30502
|
const tableName = getTableName();
|
|
30503
|
+
logger9.debug("Searching shadow records", {
|
|
30504
|
+
requestId,
|
|
30505
|
+
resource,
|
|
30506
|
+
fieldName,
|
|
30507
|
+
geohashPrefix,
|
|
30508
|
+
skPrefix: `${fieldName}#${geohashPrefix}`
|
|
30509
|
+
});
|
|
30503
30510
|
const queryResult = await executeDynamoDBOperation(
|
|
30504
30511
|
() => dbClient2.send(
|
|
30505
30512
|
new import_lib_dynamodb5.QueryCommand({
|
|
@@ -30516,11 +30523,23 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30516
30523
|
"Query"
|
|
30517
30524
|
);
|
|
30518
30525
|
const shadowRecords = queryResult.Items || [];
|
|
30526
|
+
logger9.debug("Shadow records found", {
|
|
30527
|
+
requestId,
|
|
30528
|
+
resource,
|
|
30529
|
+
geohashPrefix,
|
|
30530
|
+
count: shadowRecords.length
|
|
30531
|
+
});
|
|
30519
30532
|
const mainRecordIds = shadowRecords.map((item) => {
|
|
30520
30533
|
const sk = item.SK;
|
|
30521
|
-
const
|
|
30522
|
-
return
|
|
30534
|
+
const parts = sk.split("#id#");
|
|
30535
|
+
return parts.length === 2 ? parts[1] : null;
|
|
30523
30536
|
}).filter((id) => id !== null);
|
|
30537
|
+
logger9.debug("Main record IDs extracted", {
|
|
30538
|
+
requestId,
|
|
30539
|
+
resource,
|
|
30540
|
+
geohashPrefix,
|
|
30541
|
+
ids: mainRecordIds
|
|
30542
|
+
});
|
|
30524
30543
|
const mainRecords = await Promise.all(
|
|
30525
30544
|
mainRecordIds.map(async (id) => {
|
|
30526
30545
|
const result2 = await executeDynamoDBOperation(
|
|
@@ -30540,7 +30559,14 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30540
30559
|
return result2.Items?.[0];
|
|
30541
30560
|
})
|
|
30542
30561
|
);
|
|
30543
|
-
|
|
30562
|
+
const validRecords = mainRecords.filter((item) => item !== void 0);
|
|
30563
|
+
logger9.debug("Main records retrieved", {
|
|
30564
|
+
requestId,
|
|
30565
|
+
resource,
|
|
30566
|
+
geohashPrefix,
|
|
30567
|
+
count: validRecords.length
|
|
30568
|
+
});
|
|
30569
|
+
return validRecords;
|
|
30544
30570
|
}, "searchFunction");
|
|
30545
30571
|
const result = await executeNearSearch(
|
|
30546
30572
|
nearQuery,
|