This day I'm working on build index script and update indexes on the fly.

After discussing with mentor, he suggest me to use

name = item.get_revision(-1)[NAME]

for getting item name from last revision. But trashed item has name looking like u'Trash/doc (2011-06-26 00:49:11 UTC)' and when script runs first time all revisions were succesfully added, but at second one script try to add this item again.

It happens because item_name_analyzer parses given phrase and whoosh searcher can't find anyting related with it.

For runtime index updating we decided to use whoosh.writing.AsyncWriter, but later we'll need another solution because moin process can terminate at any time and lost data.

--

https://bitbucket.org/marchael/moin-2.0/changeset/7ad7f9472ae0

Fixing some names for better usability,

changes in move functions(not it remove old indexes before add new),

fix bug with copy empty indexes.

TODO: whoosh searcher can't find items moving to trash, so it continuely try to add trashed revisions to index.

MoinMoin: MichaelMayorov/GSoC2011Diary/2011-07-01 (last edited 2011-07-01 16:38:26 by MichaelMayorov)