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