Print

Print


You _could_ use an atom results with no actual results (pretend they 
asked for the equivalent of rows=0), but use that totalResults element 
you mention. And possibly other metadata about the search itself.

That's probably what I'd do, but I don't know if it's neccesarily 'right'.

I don't know of any other standard for "just return the count and 
nothing else".

Your suggestion to send text/plain with nothing in it but the 
count....   I'm not sure, it seems kind of sort of reasonable, but it 
certainly doesn't allow much room for expandability if you later 
realize, oh yeah, we really need just one more bit of info, not just the 
count.

I kind of like the idea of an atom result set with no actual individual 
entries. Or even just the opensearch elements without atom, somehow.

On 3/21/2012 11:31 AM, Walter Lewis wrote:
> In the various bundles of good ideas that represent result set
> "standards" in the library and greater world, apart from the
> atom/opensearch<totalResults>  element, is there an expectation of how
> one should package a number when that is *all* that is being
> requested?
>
> Use Case:
>    dear dataset:
>         if I asked you for "steamboat" records, how many would you send me?
>             signed:  curious
>
>    dear curious:
>        12
>          signed: dataset
>
> I'm inclined to return just the number as Content-Type: text/plain.
>
> Clearly the semantics of the query string require a mutual
> understanding, but that's not my specific concern here.
>
> Walter
>