2008/5/7 Jamie McCracken &lt;<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>&gt;:<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>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; The current spec requires that the server keep a list of all<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; uris<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; mapped to hit ids somehow. Of you know the index will not<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; change you<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; can rerun the query.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; There is no need to fetch &nbsp;a single uri via GetHits. The<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; HitsAdded<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; signal tells you how many hits there. You do not have to use<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; GetHits<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at all. If you use GetHitData exclusively for getting the<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; data, you<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; basically are paging.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; So the current spec is fine for sequential access _and_<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; paging.<br>
&gt;<br>
&gt; I would think so too - no matter what the conclusion on the<br>
&gt; misunderstanding above is.<br>
&gt;<br>
&gt; I am still very open for discussions, but I have yet to see a<br>
&gt; (realistic) use case where the current spec would fail. I think we<br>
&gt; need a good use case and detailed spec of the suggested new API (what<br>
&gt; it does in error conditions, is it correlated with GetHits sequential<br>
&gt; access, does it use hit.fields or take requested fields as params -<br>
&gt; 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>&nbsp; hits = GetHitData (search, [99, 100, ..., 109], [xesam:url])&nbsp; <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>&nbsp; hits = [<br>&nbsp;&nbsp;&nbsp; [file:///home/mikkel/illegal_rip.mp3]<br>
&nbsp;&nbsp;&nbsp; [file:///home/mikkel/x-rated-III.avi]<br>&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; [file:///home/mikkel/pink_pony.jpg]<br>&nbsp; ]<br><br>Cheers,<br>Mikkel<br>