2007/1/17, Jamie McCracken <<a href="mailto:jamiemcc@blueyonder.co.uk">jamiemcc@blueyonder.co.uk</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mikkel Kamstrup Erlandsen wrote:<br>> Proposed Updates for the Simple API:<br>> --------------------------------------------------------------<br>><br>> - Change GetHitProperties (in s query_handle, in i offset, in i limit,
<br>> in as props, out a{sa{sas}}) to GetHits(in s query_handle, int i offset,<br>> int i limit, in as props, out aas) where the output is on the form<br>> [[HitId, props in rq. order], [HitId, props in rq. order], ...]. This
<br>> seemed to be the consensus of the recent discussions.<br><br>"aav" would be better than "aas" as some metadata will have muliple<br>values (email:to, email:cc etc)</blockquote><div><br><br>Whether or not to use a variant is a tricky question. I would prefer using a return value like "aaas" in all cases instead. I have no arguments except gut feeling though. Variants would allow for values like file:size to be returned as integers though. This logic might equally well be pushed to the toolkit bindings instead though.
<br><br>What do you guys think?<br></div><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Although our rdf query output has moved from "a{ss}" to "aas" in the
<br>past, we will be shortly going to "aav" to handle the above cases better.<br><br><br>><br>> Stuff to Think About:<br>> ---------------------------------------------------<br>> - Ordering : Is it fair to expect ordered results from the indexer at
<br>> all? From the new return type of of GetHits I would assume that the<br>> result set was ordered. This may be fine in the simple api, but if we<br>> want to use the same data structures in the live api it is beginning to
<br>> look weird. Hits with a really high score might be added after all hits<br>> have otherwise been retrieved. Also in the new query xml language you<br>> can actually specify an ordering (and grouping) - does this make sense
<br>> at all?<br><br>we can ignore the hit score race condition. <br></blockquote><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The sort order should always include rank. If a result was asked to be
<br>ordered by say File:Size then the result set should be ordered by<br>File:Size and then rank (so files with the same size will be ordered by<br>rank). Of ocurse if no order by is specified then rank alone should be used
</blockquote><div><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">><br>> - Moving ShowConfiguration() to<br>> org.freedesktop.search.ui.ShowConfiguration
()? A drawback is that we<br>> can't guarantee that search.simple and search.ui is owned by the same<br>> d-bus services. If we had a search.ui we could also add a<br>> search.ui.ShowSearchTool(in s search_string).
<br><br>a separate ui interface might be more apt</blockquote><div><br>Ok. SP how about a search.ui interface with the methods:<br><br> - ShowConfiguration (in s toolkit_hint, out s error_msg)<br>toolkit_hit is a string to hint which toolkit to use. "gtk", "qt", "fox", "fltk", "cocoa". If error_msg!="" an error occured.
<br><br>- ShowSearchTool (in s default_search_string, in s toolkit_hint, out s error_message)<br>default_search_string is a string to set in the ui when it is spawned<br></div><br>Cheers,<br>Mikkel<br><br></div><br>