[Sugar-devel] Technique to extract all records from xapian DB?

Tomeu Vizoso tomeu at sugarlabs.org
Wed Dec 16 15:46:27 EST 2009

On Wed, Dec 16, 2009 at 17:48, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> On Fri, Dec 11, 2009 at 2:35 PM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>> I think it's worth trying, but not sure if worth merging and
>> deploying. 0.82 didn't used directly the python xapian bindings, but
>> some wrapper on top of it that tried to make easier the mapping
>> between keys in the B-tree and metadata values.
> Yeah. It's a very complex beast that, after following the callstack
> hither and yon, only makes a v simple mapping. I've written a 20 line
> mini-reader class using xapian directly. Instead of following the DS
> code, I used the CLI tools that xapian includes, and it is a trivial
> thing. Needs a bit more time but it'll work.

Sounds good, if you need later to move to python, we can do something
easily if we know the prefixes for each field.

>> The mapping mentioned before is persisted in index/config inside the DS dir.
> Ah, it's not static? The number-field mapping It seems stable to me
> testing it. So the right way is to read that 'config', how do you
> parse it?

I think it should be stable for the fields we care about, which is a fixed set:




> Good that I asked.
> m
> --
>  martin.langhoff at gmail.com
>  martin at laptop.org -- School Server Architect
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff

«Sugar Labs is anyone who participates in improving and using Sugar.
What Sugar Labs does is determined by the participants.» - David

More information about the Sugar-devel mailing list