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 16:29 +0200, Jos van den Oever wrote:<br>
&gt; 2008/5/7 Jamie McCracken &lt;<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>&gt;:<br>
&gt; &gt; &nbsp;we need ranges in order to search efficiently - having potentially<br>
&gt; &gt; &nbsp;random hit IDs passe to that function means we cannot optimise (no way<br>
&gt; &gt; &nbsp;to tell in advance if its a range)<br>
&gt; &gt;<br>
&gt; &gt; &nbsp;Its so bad that we will add an extension GetPagedHits ourselves if no<br>
&gt; &gt; &nbsp;one else wants it!<br>
&gt;<br>
&gt; You&#39;re seeing ghosts. It&#39;s trivial and very quick to check if a range<br>
&gt; of numbers is sequential.<br>
&gt; If it&#39;s sequential, you can use your optimized range function, if not,<br>
&gt; get the hits one by one. For the later you need a function anyway.<br>
&gt;<br>
</div></blockquote><div><br>Jamie?&nbsp; Can you comment on Jos&#39; answer? If you implement paged hit retrieval anyway, it would be a very cheap optimization to check if hit_ids are sequential in GetHitData and then take the optimized path.<br>
<br>If it is not enough to simply change the documentation of GetHitData to imply that it is more advanced way to retrieve hits (and not mainly a tool to use on HitsModified), can you then be more specific about your needs (for the method)? I am thinking:<br>
<br>&nbsp;* A use case - No app I know of will require the API you describe. Not even the native Tracker search tool (it can only scroll pages sequentially). Anywhere libbeagle is usable, so is Xesam, but with a more advanced interface.<br>
&nbsp;*&nbsp; Should it take an array of fields to retrieve, or use the hit.fields property like GetHits?<br></div></div><br>If you want to take the fields as an arg I think it is earily close to GetHitdata, but if you want to use hit.fields, ie GetPagedHits(in s search, in u offset, in u count, out aav hits), then it makes more sense to me.<br>
<br>Cheers,<br>Mikkel<br>