2006/11/19, Jos van den Oever <<a href="mailto:jvdoever@gmail.com">jvdoever@gmail.com</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;">
2006/11/19, Mikkel Kamstrup Erlandsen <<a href="mailto:mikkel.kamstrup@gmail.com">mikkel.kamstrup@gmail.com</a>>:<br><br>> org.freedesktop.search.simple.countHits ( in s query , out<br>> i count ):<br>> Why is this necesary. Is it to accomodate use cases such as suggestion
<br>> popups like below[1], and reduce the dbus wire traffic for multiple calls?<br>Not just that, it is also required for paging ( page 1, page 2, etc)<br>and lines like 'Found X hits.'</blockquote><div><br>Ah, ofcourse :-)
<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;">> Type text in entry: net<br>> Get a popup with:<br>> net (7801)
<br>> network (6578)<br>> netto (17)<br>No, this is another case. Here you see numbers for each keyword, but<br>where do you get the keywords from? For something like that you'd need<br>a call like:
<br>expandWord(in s word, out a(si) wordlist)</blockquote><div><br>Well, it could be based on an expandQuery() method, but applications could also list old searches with hit counts. Ie. in the above example I would have searched for net, network and netto at some point in the past. There are numerous ways to obtain suggestions...
<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;">> org.freedesktop.search.simple.query ( in s query, in i<br>> offset, in i limit , out as hits ):
<br>> What is the general consumer of this method? I don't see many. Only stuff<br>> like deskbar-applet or a general search tool would use it. Maybe adding a<br>> parameter to specify a list of groups the hits should match (or maybe
<br>> specifying mimetypes). This argument could be "*" or something to get all<br>> kinds of results. I suggest changing the signature to:<br>> query ( in s query, in as groups, in i offset, in i limit , out as hits )
<br>Interesting suggestion. It does make things quite a bit more<br>complicated. Because you'd need to define the groups. We've not talked<br>about the query language yet ( we need to, but i'm assuming we're<br>going to use something similar to what Beagle and Strigi already use,
<br>which is almost the same), but you also just expand the query like<br>this: "holiday" -> "holiday mimetype:video/*" before sending it to the<br>search-engine. That seems much better defined than a list of vaguely
<br>termed groups. I do not object to having such names for the user to<br>see though.</blockquote><div><br>Yeah, there are a few decisions to make here. How much to put in the query language and how much to put in the api. I think and expressive query language is a good idea. However your example above doesn't fir all cases well. What If I want to search for all "Documents" containing the word "parser". The Documents group could fx. be files of mime types:
<br><br>application/msword<br>application/pdf<br>application/postscript<br>application/vnd.ms-excel<br>application/vnd.oasis.opendocument.text<br>application/vnd.sun.xml.writer<br>text/plain<br>text/html<br></div><br>calling "parser mimetype:application/*" would probably not yield the desired results. Maybe also having an option to search like "parser group:documents" would be good? The Spotlight API has the notion of groups like this for example.
<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> How about live queries? Maybe that should be supported in another interface<br>
> than the simple one.<br>Yes it should. Maybe we should try to get this running first. Live<br>queries are rather tricky.</blockquote><div><br>Yeah, simple queries a definitely to priority right now. It is important that we don't forget the bigger picture when designing the interface though, so we need to take future work into consideration.
<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;">> org.freedesktop.search.simple.getProperties ( in as<br>> files,in a(sa(sas)) properties ):
<br>> This seems good. It is a bit toward a metadata interface, but I think it is<br>> good here to so apps don't need tons interfaces to work with. At some point<br>> it there should be a specification on how to name and format these
<br>> properties/metadata.<br>Small correction, it should be:<br> org.freedesktop.search.simple.getProperties ( in as files,in a(sa{sas}) )<br>where one can argue about whether or not to send back the filename<br>again. It's not needed, but also does not take much bandwidth.
</blockquote><div><br>Agreed. <br></div><br><br>Cheers,<br>Mikkel<br></div>