xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Greif" <jgr...@alumni.princeton.edu>
Subject Re: nr of results && starting position
Date Wed, 19 Jun 2002 12:26:01 GMT
Xindice is missing many things that a complete database implementation would
have.  Personally, I would put security and full transaction support higher
in priority than being able to browse query results in pages, since what you
want is obtainable in some less than optimal way by retrieving more than you
want and filtering the results.

The XPath query service specified by the xmldb consortium is not complete
enough to support the equivalent of cursors supplied by relational DBMS
systems, which allow the kind of browsing behavior you mention.  XPath does
not (as far as I know, but I'm just a beginning student of the spec) support
limiting the count of results, and it is the query language currently
available.  I think that the new XQuery (still under development as a spec
and not yet implemented in Xindice) may support this.

At least one of the mechanisms I've seen for cursors suitable for browsing
in RDBMS systems is in concept similar to what I'm about to propose as a
solution for your problem, since it uses temporary storage on the DBMS
server for a result set, and then delivers segments of the result set.

In Xindice, you could execute a query to select a set of items, based on a
timestamp or other criteria, store the resulting document in a collection
reserved for such intermediate results, return the ID of that document, and
then page through that document with queries using restrictions on
position().  It would be best to do this using the XML Object extension
mechanism (see Xindice Developer's Guide) to avoid having the intermediate
results make a round trip to the client and back to the temporary
collection.  The Xindice example code showing the use of XPath in an XML
Object (Developer's guide) lays out the basic idea.

Jeff
----- Original Message -----
From: <develop@de-schepper.be>
To: "'Jeff Greif'" <jgreif@alumni.princeton.edu>;
<xindice-users@xml.apache.org>
Sent: Wednesday, June 19, 2002 4:00 AM
Subject: RE: nr of results && starting position


...
> Nevertheless, I think you are missing the core of the problem: limiting
> the number of results.
> Let's say someone wants all items since the last 2 weeks, displaying 25
> results per page
>
> How can I achieve this ?
>
> My point is, I think Xindice is missing some features, such as:
> - limiting the number of results returned by a query,
> - Indicating a starting point from where to start the search, based on
> something else than position()
> e.g. the content of an attribute of an element ( e.g. timestamp )
> - and possible others



Mime
View raw message