Comment 29 for bug 236947

Revision history for this message
Jason Ronallo (jronallo) wrote : Re: search API improvements

> 1) Search API should return full record for each book, instead of just ID

Has this been implemented yet? I'm still just getting back just IDs. As the original requester commented, it would be nice to be able to make a single request of OL and be returned all metadata on an edition.

> http://apollonius.us.archive.org:9071/api/search?q={%22query%22:[%22authors:(felix%20klein)%20has_fulltext:1%22,%22authors:hilbert%20title:(geometry%20imagination)%22]}&prettyprint=true&format=expanded

This example link was given for how to pass multiple queries in a batch. The concern was that there would be too much crud in the response. I tried to take a look but got an error as Aaron did.

I can easily see having a batch of 30 queries to make at a time even though I'm looking for a single work. If I have an identifier like an ISBN, I may run it through a service that returns all related identifiers (OCLC, ISBN, LCCN). Then query OL with all of them. This greatly increases the chances that I will find fulltext. Now if OL is FRBRized (all related editions groups) and could return those related editions--especially fulltext ones--when passed a certain key (related:1) that'd be awesome.

When you start returning results for a batch of queries, it would be nice to have deduping already done. Some thought will need to be given to how to do this. Some folks will likely want the results for each query in a batch to be identified by the query, so this complicates what you might be able to do with deduping.

One API that you might like to look at for ideas is for MBooks/SDR. It does nice things like scoring results as well as deduping. It is still in development, so it doesn't do batches yet, but here's an example of what it can do with multiple identifiers for the same edition:
http://code.google.com/p/jquery-sdrsmd/wiki/Phase1