Xapian2009: MoinMoin.search module refactoring

Today I've started MoinMoin.search refactoring. Refactoring is done because:

First, I decomposed MoinMoin.search.builtin.Search class to BaseSearch, MoinSearch and XapianSearch. My goal is to make BaseSearch.search() return xappy.SearchResults (for xappy and something similar for moin search). This object can be passed to the some formatter which returns formatted results for showing them in browser. (Like MoinMoin.search.results.SearchResults.pageListWithContext() and pageList()) This will make it possible to call xappy.SearcResult.summarise. (For moin search it still needs to be done like it is done now)

Start rank and end rank is passed to the MoinMoin.search.searchPages(). Xapian returns only documents which will be shown.

I want that MoinSearch and XapianSearch perform only search based on the passed query. XapianSearch should not call MoinSearch if something needs to be post processed. It should be done by some other entity which takes care of which searchers to call, what must be done if index is not available and so on.

In addition, I plan to split builtin.py to some base file for BaseSearch and two others for MoinSearch and XapianSearch. MoinSearch related file will contain query parsers, matchers.

MoinMoin: Xapian2009/2009-07-29 (last edited 2009-07-29 16:46:41 by DmitriiMiliaev)