Hi,
Based on the input of a number of people in the community, I
wanted to
raise the question of supporting page and index
"offsets" in OpenSearch
1.1 final. Since this is such a late proposed addition --
and trust me,
I've been pushing back on those at all costs! -- it is
important to hear
how it might impact people before changing the
specification.
Specifically, should the final OpenSearch 1.1 format include
the ability
for search engines to specify their initial offset for
startIndex and
startPage? Many, but not all, search engines are
"1-based" but we want
to be able to accurately describe those that are
"0-based" as well.
I'm thinking that the simplest way of specifying it will be
to include
two new optional and backward compatible attributes on the
<Url>
element. The new "pageOffset" and
"indexOffset" attributes can contain
any integer value, defaulting to "1". The
client will use this value to
determine the initial values for the "startPage"
and "startIndex"
attributes, respectively.
For example, a search on A9.com could still be described by
(sorry for
the lousy email formatting):
<Url type="text/html"
template="http://a9.com/?pw={st
artPage}"/>
This uses the default offset of "1", whereas a
site like Google, which
uses a initial index of "0", could be described
by:
<Url type="text/html"
indexOffset="0"
template="http://google.com/search?
q=&start="/>
(A historical aside, the first version of the OpenSearch
Description
format did not include offsets because it was anticipated
that
supporting OpenSearch would require at least a small amount
of work on
the search engine's part. The search engine itself could
do the trivial
conversion from 1-based to 0-based internally if they needed
to.
However, OpenSearch 1.1 includes the "text/html"
response type, which
means that some clients, such as IE7 and Firefox, might be
using the
description document to point to a search engine that isn't
yet even
aware of OpenSearch, and thus won't know to do a
conversion.)
Open questions:
1) Is describing 0-based search engines important enough
to make a
change to OpenSearch 1.1?
2) Are clients of OpenSearch (I'm looking at you,
Firefox and IE)
willing to make this change?
3) Would it be better to just use a single
"offset" attribute, rather
than two separate "indexOffset" and
"pageOffset" attributes?
4) Is there a better way to represent this and still stay
simple and
backwardly compatible?
I really appreciate any and all feedback on this. Much
obliged!
-DeWitt
=== [ Opensearch.org Discuss mailing list ]
=========================
http:
//opensearch.org/mailman/listinfo/discuss/
Unsubscribe on the web page, or discuss-unsubscribe opensearch.org
Problems? Reach a human at mailman-admin opensearch.org
|