Simple search API proposal, take 2

Jean-Francois Dockes jean-francois.dockes at wanadoo.fr
Thu Jan 11 09:48:23 PST 2007


Mikkel Kamstrup Erlandsen writes:
 > One drawback of the current api proposal as found on
 > http://wiki.freedesktop.org/wiki/WasabiSearchSimple is that you
 > request the hit properties you want when you retrieve them - not when
 > you start the query. If you specified what properties you want already
 > in the Query method the search engine could start retrieving these
 > properties before you call GetHitProperties.

I am not sure that this is an issue, because the first getProperties() is
typically going to follow the initial Query() call immediately, I can't see
any use for user interaction between these calls.

There is probably not much that the backend would be able to prepare
anyway. 

So I would be in favour of keeping the current version (no separate
GetSnippets() call).

J.F. Dockes

 > Unfortunately this doesn't work well with requesting snippets in a
 > separate GetHitProperties call.
 > 
 > The only solution I see to this is to add a separate GetSnippets
 > method and move requested properties into the Query method. This would
 > give an api like:
 > 
 > ShowConfiguration()
 > 
 > Query (in s query_string, in as requested_properties, out s query_handle)
 > 
 > CountHits (in s query_handle, out i count)
 > 
 > GetHitProperties (in s query_handle, in i offset, in i limit, out
 > a{sa{sas}} response )
 > 
 > 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.
 > 
 > What do you think? Cheers,
 > Mikkel



More information about the xdg mailing list