Friday, March 02, 2007

new xISBN API - beta

I have been working on a new xISBN service in last few months, and I had a chance of sharing latest progress in excellent code4lib conference held in Athens, Ga. Thanks for all your valuable comments, folks!

The new service is now running as a beta version. We add more features/metadata, at the same time try to keep the API simple and clean.

x-identifier list is a venue for comments/suggestions.

Tuesday, February 27, 2007

things learned from SOLR api

things learned from SOLR api

I am fortunte to attend Erik Hatcher's one day Lucene/Solr tutorial, what's really attracting me is elegance of SOLR's REST API, which is at the same time concise and consistent. To start with:

-- add/query/delete/commit are all simple REST API.

as an example, delete a record is a simple HTTP POST "<delete><id>SP2514N</id></delete>", do I need to say more?

-- allows different format (but equavalent infoset)
"select?q=ipod&wt=xml" -- returns an xml format

They all return same infoset.

-- the way of controlling returned fields by query

q=video&fl=name,id (return only name and id fields)
q=video&fl=name,id,score (return relevancy score as well)
q=video&fl=*,score (return all stored fields, as well as relevancy score)

So user has control of which fields to return.

-- no xml namespace at all

This is subject to argue, but I tend to think in RPC-oriented application XML namespace doesn't really matter, and in Document-oriented applications XML namespace are important.

-- the way of organizing schema and result.

Basically everything is a field, a field has a datatype, name and value. Such as following result:

<str name="id">IW-02</str>
<bool name="inStock">false</bool>
<str name="manu">Belkin</str>

This bascially allows any fields without XML namespace/schemas.