Simple search API proposal, take 2
Mikkel Kamstrup Erlandsen
mikkel.kamstrup at gmail.com
Thu Jan 18 13:15:04 PST 2007
About the Simple api:
Picking up on an "old" issue. There was semi-agreement that the properties
to be retrieved from a Query should be passed to GetHits, as GetHits(handle,
offset, limit, props).
Each time I look at this it makes me feel very weird. Are you guys sure this
is what we want? Think about stateless find/grep implementations, ultra
light search daemons... I would guess that at least some servers might
benefit greatly from knowing what fields to extract as soon as possible.
To this end I re-propose to add the props list to the Query constructor.
Giving us an api like:
Query (xml, props,handle) --> handle
GetHits (handle, offset, limit) --> hits
The most obvious problem is that it leaves the Snippets to be retrieved
along side other properties - which we agreed on was a bad idea. Since each
hit is uniquely determined in a query context by its sequence number, we
could use that to look up additional hit metadata, fx. the snippet. Adding
API like so:
GetHitMetadata (in s handle, in ai hits, in as props) --> results
What do you guys say? If you decline again I shall accept it and hold my
peace regarding this issue. Cheers,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xdg