Simple search API proposal, take 2
Joe Shaw
joeshaw at novell.com
Thu Jan 11 08:49:27 PST 2007
Hi,
On Thu, 2007-01-11 at 11:48 +0100, Mikkel Kamstrup Erlandsen wrote:
> Query (in s query_string, in as requested_properties, out s query_handle)
Is the idea here that the query will actually be run when Query is
called, or is there just some server-side preparation for it?
If the query is actually run, that means the server has to keep all
information about all the hits in memory until the query handle is
somehow released. (An API call which I think is missing.)
My Beagle index contains over 1 million documents, obviously this could
quite easily get out of hand with a bunch of queries running.
It not, and the query is only run on demand,
> CountHits (in s query_handle, out i count)
>
> GetHitProperties (in s query_handle, in i offset, in i limit, out
> a{sa{sas}} response )
Then these calls would be racy, because the index could change between
calls. I believe you want the query to run on demand, however, because
of the limit passed in.
Could you define what the a{sa{sas}} map is?
I think you probably also want an API where you just get a list of URIs;
sometimes that's all you care about. (This is a weakness in the Beagle
API, and one which we're going to be fixing.)
> GetSnippets (in s query_handle, in as hit_handles)
>
> here hit_handles (in GetSnippets) is a list of keys from the a{sa{sas}} map.
We would probably just use the URI as the key; the rename race is no
worse than the removal race.
Joe
More information about the xdg
mailing list