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

Martin Langhoff martin.langhoff at gmail.com
Wed Dec 16 14:48:44 EST 2009


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.

> 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?

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


More information about the Sugar-devel mailing list