<br><br><div><span class="gmail_quote">2007/7/17, Arun Raghavan &lt;<a href="mailto:arunisgod@gmail.com">arunisgod@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello<br><br>On 7/16/07, Mikkel Kamstrup Erlandsen &lt;<a href="mailto:mikkel.kamstrup@gmail.com">mikkel.kamstrup@gmail.com</a>&gt; wrote:<br>&gt; Hi again,<br>&gt;<br>&gt; I have a few suggestions for updates to the xesam search spec.
<br>&gt;<br>&gt; * API:<br>&gt; Remove the session properties search.blocking and search.live. These seemed<br>&gt; to cause more confusion than I anticipated. These can be emulated in the<br>&gt; client side lib as far as my scribblings can tell. Anoter solution might
<br>&gt; just be better documentation of course...<br>&gt;<br>&gt; Some of you now have actual experience with these, what is your feel?<br>&gt;<br>&gt; The reason for having these properties in the first place was to allow
<br>&gt; easier usage of the dbus interface directly - ie not via a client lib.<br>&gt;<br>&gt; What this would mean for the api methods:<br>&gt;&nbsp;&nbsp;* GetHits should always block until the requested number of hits has been<br>
&gt; found or the entire index has been searched (in which case the SearchDone<br>&gt; signal will be emitted too).<br>&gt;&nbsp;&nbsp;* CountHits should always block until the entire index has been searched<br>&gt;&nbsp;&nbsp;* No other methods should block
<br>&lt;snip&gt;<br><br>I have no experience with client design, but here&#39;s my suggestion:<br><br>&quot;search.live&quot; should remain, but &quot;search.blocking&quot;<br>should probably be dropped. By definition, a non-live search will
<br>cause GetHits() and CountHits() to block till the search is finished.</blockquote><div><br>By the current standard search.live does not determine this behavior.
That is the matter of search.blocking. If search.blocking is false
these methods should return immediately with current avail hits or
current found number of hits (which will only be final when the entire
index has been searched). Or are you talking about the new suggestion?&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">A live search will never block -- both these calls will return with
<br>what hits are available. This seems to be a reasonably intuitive model<br>to me.</blockquote><div><br>Did you mean to post to the list? Please post there if you wanted to, I&#39;ll put a reply there too then.<br><br>The
reason for just letting all calls block is that dbus has a build in
mechanism for doing async calls (via a callback when the method
returns) - thus if we always stick with dbus (and don&#39;t want to do a
xesam-over-unix-sockets spec in the future) we can safely say that GetHits and
CountHits always block.
<br><br>Another important matter might be whether or not to keep the
hit set around on the server? Atleast some clients such as deskbar has
no need to re-read hits or fetch additional metadata via GetHitData. We
could specify that if search.live == false the server is free to drop
the hits as soon as they are read with GetHits.<br><br>This
last idea would imply that the GetHitData method only makes sense if
search.live == true. If not it should probably return an empty set
(dbus has no NULL) or throw an error.
<br><br>Cheers,<br>Mikkel<br>&nbsp;</div><br></div><br>