[Xesam] Need paged search mode for xesam

Jamie McCracken jamie.mccrack at googlemail.com
Wed May 7 06:51:26 PDT 2008


On Wed, 2008-05-07 at 15:30 +0200, Mikkel Kamstrup Erlandsen wrote:
> 2008/5/7 Jamie McCracken <jamie.mccrack at googlemail.com>:
>         
>         On Wed, 2008-05-07 at 12:37 +0200, Mikkel Kamstrup Erlandsen
>         wrote:
>         
>         >
>         >
>         >         The current spec requires that the server keep a
>         list of all
>         >         uris
>         >         mapped to hit ids somehow. Of you know the index
>         will not
>         >         change you
>         >         can rerun the query.
>         >
>         >         There is no need to fetch  a single uri via GetHits.
>         The
>         >         HitsAdded
>         >         signal tells you how many hits there. You do not
>         have to use
>         >         GetHits
>         >         at all. If you use GetHitData exclusively for
>         getting the
>         >         data, you
>         >         basically are paging.
>         >
>         >         So the current spec is fine for sequential access
>         _and_
>         >         paging.
>         >
>         > I would think so too - no matter what the conclusion on the
>         > misunderstanding above is.
>         >
>         > I am still very open for discussions, but I have yet to see
>         a
>         > (realistic) use case where the current spec would fail. I
>         think we
>         > need a good use case and detailed spec of the suggested new
>         API (what
>         > it does in error conditions, is it correlated with GetHits
>         sequential
>         > access, does it use hit.fields or take requested fields as
>         params -
>         > like GetHitdata, etc).
>         
>         
>         Well pls give example where I get all hit URI for results
>         100-110 for a
>         search
> 
> Say you receive HitsAdded (search, 2768). If this is the first
> HitsAdded this means that hits with ids 0..2767 are ready.
> 
> Now
>   hits = GetHitData (search, [99, 100, ..., 109], [xesam:url])  
> 
> 
> This will give you an array of hits matching the hit_ids provided in
> the method, each hit being an array of Values matching the field names
> you requested (just xesam:url):
>   hits = [
>     [file:///home/mikkel/illegal_rip.mp3]
>     [file:///home/mikkel/x-rated-III.avi]
>     ...
>     [file:///home/mikkel/pink_pony.jpg]
>   ]
> 

So we need to make sure Hit Ids are sequential form zero then?

feels like a hack especially as the wiki page says:

http://xesam.org/main/XesamSearchAPI

"GetHitData (in s search, in au hit_ids, in as fields, out aav hit_data)

Get renewed or additional hit metadata. Primarily intended for snippets
or modified hits
"

also its grossly inconvienient for doing large pages eg 101-200 - I
would have to list 100 numbers in one big array !!!!

seriously add a Paged/Ranged that works like GetHitData and make it
sane!

jamie




More information about the Xesam mailing list