2008/5/6 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;">
you mean pull results over dbus and then page at client?<br>
</blockquote><div><br>No. The signature of GetHitData is (in s search_handle, in au hit_ids, in as fields, out aav hits)<br><br>Ie you request which hits ids to fetch. To fetch a page pass [n, n+1, ..., n+page_size] as hit_ids.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
thats inefficient - pulling 10,000 hits over dbus is insanely slow (even<br>
just the URI)<br>
</blockquote><div><br>Hmmm, how slow is "insanely slow"? I doubt that this is true (by my standards of insanely slow).<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Paging is a must have im my book otherwise tracker api will have to be<br>
used a lot instead of xesam whenever paged results are desired (more<br>
likely we will add Paged search to xesam on top of the standard)<br>
<font color="#888888"></font></blockquote><div><br>With a seekable API paging is easy to implement on the client.<br> <br>Cheers,<br>Mikkel<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br></font><div><div class="Wj3C7c"><br>
On Tue, 2008-05-06 at 17:12 +0200, Mikkel Kamstrup Erlandsen wrote:<br>
> 2008/5/6 Jamie McCracken <<a href="mailto:jamie.mccrack@googlemail.com">jamie.mccrack@googlemail.com</a>>:<br>
><br>
><br>
> On Tue, 2008-05-06 at 16:57 +0200, Mikkel Kamstrup Erlandsen<br>
> wrote:<br>
> > 2008/5/2 Mikkel Kamstrup Erlandsen<br>
> <<a href="mailto:mikkel.kamstrup@gmail.com">mikkel.kamstrup@gmail.com</a>>:<br>
> > I have a handful comments about this (Jos also asked<br>
> about the<br>
> > same on<br>
> > IRC recently).<br>
> > It was in fact a design decision, but i am writing<br>
> this from<br>
> > my mobile<br>
> > since I'm on holiday, so I'll elaborate when I get<br>
> home<br>
> > tuesday.<br>
> ><br>
> > Cheers,<br>
> > Mikkel<br>
> ><br>
> > As promised...<br>
> ><br>
> > Let's first establish some terminology. A Paged Model is one<br>
> where you<br>
> > can request hits with an offset and a count. A Streaming<br>
> Model is one<br>
> > like we have now, where you specify how many hits to read on<br>
> each<br>
> > request and then read hits sequentially (like file reading<br>
> without<br>
> > seeking).<br>
> ><br>
> > It should be noted that the Xesam Search spec is designed<br>
> for desktop<br>
> > search (and not generic search on a database or Google-style<br>
> web<br>
> > search with millions of hits). Furthermore it should be<br>
> feasible to<br>
> > implement in a host of different backends, not just full<br>
> fledged<br>
> > search engines.<br>
> ><br>
> > There are basically three backends where a paged model can<br>
> be<br>
> > problematic. Web services, Aggregated searches, and<br>
> Grep/Find-like<br>
> > implementations.<br>
> ><br>
> > * Web services. While Google's GData Query API does allow<br>
> paging, not<br>
> > all webservices does this. For example the OAI-PMH[1]<br>
> standard does<br>
> > not do paging, merely sequential reading. Ofcourse OAI-PMH<br>
> is a<br>
> > standard for harvesting metadata, but I could imagine a<br>
> "search<br>
> > engine" extracting metadata from the OAI-PMH result on the<br>
> fly.<br>
> ><br>
> > * Aggregated search. Consider a setup where the Xesam<br>
> search engine<br>
> > is proxying a collection of other search engines. It is a<br>
> classical<br>
> > problem to look up hits 1000-1010 in this setup. The search<br>
> engine<br>
> > will have to retrieve the first 1010 hits from all<br>
> sub-search engines<br>
> > to get it right. Maybe there is a clever algorithm to do<br>
> this more<br>
> > cleverly, but I have not heard of it. This is ofcourse also<br>
> a problem<br>
> > in a streaming model, but it will not trick developers into<br>
> believing<br>
> > that GetHits(s, 1000, 1010) is a cheap call.<br>
> ><br>
> > * Grep-like backends or more generally backends where the<br>
> search<br>
> > results will roll in sequentially.<br>
> ><br>
> > I think it is a bad time to break the API like this. It is<br>
> in fact a<br>
> > quite big break if you ask me, since our current approach<br>
> has been<br>
> > stream-based and what you propose is changing the paradigm<br>
> to a page<br>
> > based model. Also bad because it is the wrong signal to send<br>
> with such<br>
> > and important change in the last minute.<br>
> ><br>
> > I see a few API-stable alternatives though.<br>
> ><br>
> > 1) Add a SeekHit(in s search, in i hit_id, out i new_pos).<br>
> This<br>
> > basically adds a cursoring mechanism to the API<br>
> > 2) In style of 1) but lighter - add SkipHits(in s search, in<br>
> i count,<br>
> > out i new_pos)<br>
> ><br>
> > These options also stay within the standard streaming<br>
> terminology. We<br>
> > could make them optional by making them throw exceptions if<br>
> the (new)<br>
> > session property vendor.paging is True.<br>
> ><br>
> > As Jos also points out later in the thread GetHitData is<br>
> actually<br>
> > paging and the workaround he describes can actually be made<br>
> very<br>
> > efficient since we already have the hit.fields.extended<br>
> session prop<br>
> > to hint what properties we will fetch.<br>
> ><br>
> > Let me make it clear that I am not refusing the change to a<br>
> paging<br>
> > model if that is what the majority rules. We should just<br>
> make an<br>
> > informed decision that we are sure we agree on.<br>
> ><br>
><br>
><br>
><br>
> im proposing adding new api not breaking existing ones. The<br>
> existing<br>
> stuff can easily emulate paging if it lacks native support<br>
><br>
> I would prefer new api that takes a start point param and a<br>
> count/length<br>
> param sow e have full random access<br>
><br>
> And how is GetHitData not good enough for that?<br>
><br>
> Cheers,<br>
> Mikkel<br>
><br>
<br>
</div></div></blockquote></div><br>