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 16:29 +0200, Jos van den Oever wrote:<br>
> 2008/5/7 Jamie McCracken <<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>>:<br>
> > we need ranges in order to search efficiently - having potentially<br>
> > random hit IDs passe to that function means we cannot optimise (no way<br>
> > to tell in advance if its a range)<br>
> ><br>
> > Its so bad that we will add an extension GetPagedHits ourselves if no<br>
> > one else wants it!<br>
><br>
> You're seeing ghosts. It's trivial and very quick to check if a range<br>
> of numbers is sequential.<br>
> If it's sequential, you can use your optimized range function, if not,<br>
> get the hits one by one. For the later you need a function anyway.<br>
><br>
</div></blockquote><div><br>Jamie? Can you comment on Jos' 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> * 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>
* 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>