Problem searching Koninklijke Bibliotheek (NL).

TalkBug Collectors

Join LibraryThing to post.

Problem searching Koninklijke Bibliotheek (NL).

This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.

1Aryanhwy
Apr 18, 2012, 4:25am

I've got a new book to add and none of the amazons I usually check (.com, .co.uk, .de) have the ISBN, probably because it's a Dutch book. Went to search the Koninklijke Bibliotheek, and I got this error message:

Warning: simplexml_load_file(http://sru.kb.nl/sru/sru.pl?x-collection=GGC&version=1.1&operation=searc...): failed to open stream: Connection refused in /var/www/html/inc_externalbooksearch.php on line 115 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://sru.kb.nl/sru/sru.pl?x-collection=GGC&version=1.1&operation=searchRetrieve&query=isbn+all+9027418721&recordSchema=dc&startRecord=1" in /var/www/html/inc_externalbooksearch.php on line 115 Fatal error: Call to a member function children() on a non-object in /var/www/html/inc_externalbooksearch.php on line 119

If you want to reproduce the error, the ISBN I'm searching is 9027418721.

2divinenanny
Apr 18, 2012, 8:51am

I work at the Koninklijke Bibliotheek, but this is not an official KB reply. But I do know what is going on.
The problem is that LT queries SRU. The KB doesn't use SRU anymore, but now uses JSRU. The query should be formatted as such:

http://jsru.kb.nl/sru?x-collection=GGC&operation=searchRetrieve&query=mu...

When I run the query above from Aryanhwy in that manner I still don't get the response I expect, but mine works. It appears that the part of query (isbn+all+) is too much. So this works:

http://jsru.kb.nl/sru?x-collection=GGC&operation=searchRetrieve&query=90...

version=1.1 also doesn't seem necessary for the query to work.

So this should help the LT wizards along, but like I said, I am by no means an expert or officially saying all this.

3divinenanny
Apr 18, 2012, 9:09am

Figured out (with help) why the ISBN query doesn't work. JSRU is case sensitive, so the query should be:

http://jsru.kb.nl/sru?x-collection=GGC&version=1.1&operation=searchRetri...

4divinenanny
Apr 18, 2012, 9:29am

Another addition:
If you add: &x-fields=ISBN to the query, a field is added to the XML output to identify the ISBN. Otherwise the ISBN is one of the dc:identifier fields, but you can't see which one.

And a request of my own, it used to be (with SRU) that when you added a book from the KB database, it never took the year (year published was always ?). Is it possible to fix this too, using the dc:date field?

5alfardm
Edited: Apr 21, 2012, 10:42am

And some other additions:
1) you can search for Titles, Authors etc. by putting the query between "". In that case ISBN-search still works.
2) for books originally published under ISBN-10, it's only possible to search by ISBN-10. But with a small tweak it is also possible to use the barcode: strip the first 3 digits of the barcode, and replace the last digit by an *, so barcode 9789018017255 becomes query 901801725* (the ISBN is 9018017256).
(books originally published under ISBN-13 can only be searched by ISBN-13, which happens to be the same as te barcode.)
3) the best dc:title-field is the one with the most information, but you have to strip everything behind the / (which are only credits).

So the following URL seems to be working for most books:
http://jsru.kb.nl/sru?x-collection=GGC&operation=searchRetrieve&query="s... search"&recordSchema=dc&startRecord=1&x-fields=ISBN

Soon I hope to post or send you a more detailed overview of the returned xml.
UPDATE: I sent the xml-analysis by email to librarythings info-address

6miketopper
Apr 25, 2012, 2:58pm

I've switched it over to use the new JSRU. thanks for the heads up divinenanny. There are still some issues, like the next link not working currently, but the search is back up.

7divinenanny
Apr 25, 2012, 11:17pm

Is there anything I can do to help?

8Boekenbeestje
Apr 27, 2012, 1:21am

Will there ever come a time when I can search like I used to?
Even though this bug is apparently is solved, it is not for me. Even with the above tips, I draw a blank every time.

Being lazy, I like to just be able to type the name of the writer and title of the book, and get several hits. At the moment, all I ever get when trying to add books is : Niets gevonden.

9divinenanny
Edited: Apr 27, 2012, 3:06am

It seems if you search more than one field, (author, title) it doesn't work... Mmmm. If they (LT) don't solve this, I will ask the wizards at work how to formulate queries so that they work (Koninklijke Bibliotheek) again.

I still have hope that they (LT) fix the import of language and year import from the data received from the KB.

10guurtjesboekenkast
May 1, 2012, 4:38pm

3> The URL you gave (http://jsru.kb.nl/sru?x-collection=GGC&version=1.1&operation=searchRetri....) only gives the information from the site map not the actual catalog.

I would like to see more books, when I only gave the name of the writer in the search box from LT.
When you ask for this kind of informations at the Vlaamse Bibliotheek I get serveral pages, with lots of titles. The information from the KB is only 1 page maximum.

11divinenanny
Edited: May 1, 2012, 11:24pm

I discussed it yesterday at work. What I figured out is that in the past, when you entered a search term, it would do a sort of 'full text search', searching all fields for the term. So when you searched for "Harry Mulisch vrouwen" you would find his book Twee Vrouwen. However, now, it only searches one field. So that same search term only searches a field at a time, and it finds nothing. You need to let the system know what fields you want to search.
None of the experts are in this week, so I don't know the exact query, but I will ask next week when they are back in.
I will also ask about the site map/catalog difference.

miketopper, can you please look at this again? Please?

12timspalding
May 3, 2012, 10:17pm

We are actively thinking about this, but haven't reached a conclusion.

Our thinking goes something like this:

1. The non-MARC sources can't be maintained. They represent entirely separate processes for getting and munging the data. Once we get it, the data is too different, so we can't really revisit it as needed, the way we've done when we've added physical description and etc.

2. We can add a few other Dutch libraries we've never connected to before.

Losing KB would be a big loss, I understand, but I think it may be necessary for moving forward with Add Books generally.

13brightcopy
May 3, 2012, 10:21pm

And this is a pretty good example of why you have to say "We support MARC. If you correctly implement a MARC interface, you can appear on LibraryThing. If not, then no." Because if you don't support the standard, you're just kind of doing your own thing. As shown here, that means you might do something else anytime you please. And sometimes that something else is rather dumb. I'd rather LT staff not go scrambling around every time a library did something dumb.

14timspalding
May 4, 2012, 1:05am

SRU is a recognized standard, although it's not very standard in practice. It's also not very common. It SHOULD be the standard, but it didn't become it.

15MarthaJeanne
Edited: May 4, 2012, 11:21am

Is something similar going on with S├╝dwestdeutscher Bibliotheksverbund SWB? I don't get an error message, but they have been my prefered German language source, and recently all searches have been very long and not found anything.

I just tested the ISBN I had entered 9783258069937 and it finds the book in their database.

16divinenanny
May 8, 2012, 4:53am

miketopper, timspalding

Ok, I asked the guys at work again, and this is what the expert says (translation to English by me):

- KB uses CQL as the query language. It is not supported completely, but the basics are supported.
- The ZING library is used to parse the queries

(I have no idea if this is imported to LT support, but I included it anyway)

If you want a query that searches multiple fields, like in the example Harry Mulisch Vrouwen (and expecting to find Twee vrouwen, this is the query to use:
http://jsru.kb.nl/sru?x-collection=GGC&version=1.1&operation=searchRetri...

Even more specific is the query:
http://jsru.kb.nl/sru?x-collection=GGC&version=1.1&operation=searchRetri...

But that searches in specific fields and I don't think that is how Add Books works on LT. It does get less hits because the dc:description field is not searched.

I also mentioned the SRU/MARC debate/issue/whatever that has been mentioned here and in the other Dutch Sources topic. That is of course a bigger thing, but it has been noted.

17yhoitink
Sep 8, 2012, 3:04pm

Is there any news on this topic? The Koninklijke Bibliotheek has virtually all of the Dutch books in its holding. Not being able to use that repository to add books has made me think about leaving LibraryThing because I now have to add all the books manually.

18jbd1
Sep 26, 2012, 11:02am

Closing as a dupe of http://www.librarything.com/topic/136178 - but the issue remains, it still on our radar; unfortunately there's just not a simple fix.

19Oodwerc
Edited: Feb 9, 2013, 4:13am

Aha, Divinenanny already found out the sru/jsru thing. Good!
I'm afraid I have been posting in the wrong threads...

For testing various queries to jsru.kb.nl, I made this little page:
http://raoulm.home.xs4all.nl/mcq.htm