[Sugar-devel] Journal feature request--more data in main display

Tomeu Vizoso tomeu at sugarlabs.org
Mon Jul 6 05:08:21 EDT 2009


On Mon, Jul 6, 2009 at 10:51, Sascha
Silbe<sascha-ml-ui-sugar-devel at silbe.org> wrote:
> On Sat, Jul 04, 2009 at 04:55:57PM +0100, Gary C Martin wrote:
>
>> Just to confirm; I take it that Xapians prefix maps haven't been used  so
>> far in the Journal index implementation (i.e. title:Paint,
>> description:meeting, or tags:homework)? Point me at rep Sugar source  if
>> that's quicker (not sure where to look to check this).
>
> You're right on spot. The only prefixes used (but not defined for the query)
> are:
>
> _PREFIX_UID = 'Q'
> _PREFIX_ACTIVITY = 'A'
> _PREFIX_ACTIVITY_ID = 'I'
> _PREFIX_MIME_TYPE = 'M'
> _PREFIX_KEEP = 'K'
>
> I.e. to search for all documents of type text/plain you can use the query
> string "Mtext/plain", but not "mime_type:text/plain".

Not quite, the association from mime_type: to M is doing when
constructing the query:

http://xapian.org/docs/apidoc/html/classXapian_1_1QueryParser.html#dfd545b4ac739adc2e4171169a500f33

And, from the docs, it does more than just appending M to the query
string, as it can do things like author:"charles dickens" and
title:(mice men).

So to support that we just need to call add_prefix on the QueryParser
for every field prefix.

Regards,

Tomeu

> See [1].
>
> I'd like to expose a better IR search facility in the future, but not within
> 0.86 timeframe (there are several open, hard problems).
>
>
> [1]
> http://git.sugarlabs.org/projects/sugar-datastore/repos/mainline/blobs/master/src/carquinyol/indexstore.py
>
> CU Sascha
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iQEcBAEBAgAGBQJKUbsrAAoJELpz82VMF3DaRTAH+QFWfnGvagCl5Vw3ujZceInp
> v4D7PKANidrP8+8GShMaeeXbN1eS7xO4pxEmcQsHqCpEnziS9LM6XGHuuHv67Ab9
> BNg+2FMSZbwnBvhK0ZHBclOKxzQZt20uNJywAb5DU4AkyqqGbAR6+KCrKWb4rpH9
> EjvZEQqTGVVrrj4HNMmHU7C7co++ftAlrTLK3jQs1qw0HHvxBZZgU5Y4SBjqPtM2
> v7c/Nb+NfP4wD5TZAonb9d4eCMf0dqWkgprWTzJ0/q0qLF8hh2bhHMbdF2jZC+YE
> +cPPg6NLSiPcFkuHbTLkI5nuOervWpgV9anf6Wh/bXy33nMEjciHf2JtOL4AMcA=
> =DwBt
> -----END PGP SIGNATURE-----
>
>


More information about the Sugar-devel mailing list