Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDLサーチインポートが動作しない #1846

Closed
masao opened this issue Jan 5, 2024 · 6 comments
Closed

NDLサーチインポートが動作しない #1846

masao opened this issue Jan 5, 2024 · 6 comments
Milestone

Comments

@masao
Copy link
Member

masao commented Jan 5, 2024

https://ndlsearch.ndl.go.jp/news/renkei_20240105
NDLサーチとNDLオンラインの統合にともない、APIエンドポイントが変更になっているからか、ISBNインポート・検索インポートともに動作しなくなっているようです。

@nabeta
Copy link
Member

nabeta commented Jan 6, 2024

@masao NDLサーチのAPIの動作が変わっているようです。以前は以下のURLで書誌事項が取得できていたのですが(テストコード)、
https://iss.ndl.go.jp/api/sru?maximumRecords=1&onlyBib=true&operation=searchRetrieve&query=(itemno=R100000002-I000010980901-00)&recordSchema=dcndl

ホスト名を変え、itemnoの末尾の00の有無を変更したのですが、いずれもRecord does not existエラーになります。
https://ndlsearch.ndl.go.jp/api/sru?maximumRecords=1&onlyBib=true&operation=searchRetrieve&query=(itemno=R100000002-I000010980901-00)&recordSchema=dcndl
https://ndlsearch.ndl.go.jp/api/sru?maximumRecords=1&onlyBib=true&operation=searchRetrieve&query=(itemno=R100000002-I000010980901)&recordSchema=dcndl

同じCQLでもISBNの指定では結果が帰ってくるので、itemnoの指定の問題のように見えますが、まだ原因がつかめていません。
https://ndlsearch.ndl.go.jp/api/sru?operation=searchRetrieve&recordSchema=dcndl&maximumRecords=1&query=(isbn=978-4-8399-3199-5)

@nabeta
Copy link
Member

nabeta commented Jan 11, 2024

NDLに問い合わせたところ、itemnoには「(リポジトリ番号-アイテム番号)」のうちの「アイテム番号」を指定するとの回答がありました。ただ実際に指定するのは、R100000002-I000010980901のうちI000010980901から、さらに先頭のIを削除した000010980901となるようです。
https://ndlsearch.ndl.go.jp/api/sru?maximumRecords=1&onlyBib=true&operation=searchRetrieve&query=(itemno=000010980901)&recordSchema=dcndl

これはNDLサーチの詳細画面で「国立国会図書館書誌ID」として表示されている番号なのですが、APIドキュメントになぜそう書いていないのかはよくわかりません。
https://ndlsearch.ndl.go.jp/books/R100000002-I000010980901

また、現時点ではonlyBib=trueパラメータを指定しても、レスポンスに所蔵情報が含まれています。この点について、追加でNDLに問い合わせています。

@nabeta
Copy link
Member

nabeta commented Jan 21, 2024

上記の動作はいずれも不具合で、修正予定とのこと。
https://ndlsearch.ndl.go.jp/news/renkei_20240105#sec5-2

修正予定の実装
 itemnoとして「リポジトリ番号-アイテム番号」を指定
https://ndlsearch.ndl.go.jp/api/sru?operation=searchRetrieve&version=1.2&query=itemno=R100000049-I032691189

現在、SRUのonlyBibの指定に不具合があることを確認しています。
onlyBibの指定によって書誌情報のみが取得できるよう修正を予定しています。

@nabeta
Copy link
Member

nabeta commented Jan 21, 2024

1月21日の開発ワークショップで、ひとまずNDLサーチの対応を待つこととした。

@nabeta
Copy link
Member

nabeta commented Feb 4, 2024

1月31日にこれらの不具合は修正済みとのことなので、これからEnju側の修正に入ります。
https://ndlsearch.ndl.go.jp/news/renkei_20240105#sec5-2

@nabeta
Copy link
Member

nabeta commented Mar 31, 2024

#1854, #1857, #1859 で対応済みのため、クローズします。

@nabeta nabeta closed this as completed Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants