See http://www.mediawiki.org/wiki/Manual:%24wgAPIModules: "Extension modules cannot override the core modules." Why is that? As far as I understand extension modules can override special pages, so why not api modules? It would be particularly useful for extension LuceneSearch. This extension overrides Special:Search and its (not yet committed) api module should also override list=search.
Bryan
Bryan Tong Minh schreef:
See http://www.mediawiki.org/wiki/Manual:%24wgAPIModules: "Extension modules cannot override the core modules." Why is that? As far as I understand extension modules can override special pages, so why not api modules? It would be particularly useful for extension LuceneSearch. This extension overrides Special:Search and its (not yet committed) api module should also override list=search.
Bryan
Good one. I changed that line only minutes before you read it, as it used to say overriding *was* possible (which it isn't in the current implementation). I'll go and change this, although we should probably stick a big fat warning on this kind of thing: we don't want extensions to change a core API module's interface too drastically.
Roan Kattouw (Catrope)
Roan Kattouw schreef:
Bryan Tong Minh schreef:
See http://www.mediawiki.org/wiki/Manual:%24wgAPIModules: "Extension modules cannot override the core modules." Why is that? As far as I understand extension modules can override special pages, so why not api modules? It would be particularly useful for extension LuceneSearch. This extension overrides Special:Search and its (not yet committed) api module should also override list=search.
Good one. I changed that line only minutes before you read it, as it used to say overriding *was* possible (which it isn't in the current implementation). I'll go and change this, although we should probably stick a big fat warning on this kind of thing: we don't want extensions to change a core API module's interface too drastically.
Upon closer examination of the code, it appears overriding is already possible, so go ahead with your Lucene module.
Roan Kattouw (Catrope)
On Sun, Mar 2, 2008 at 9:00 AM, Bryan Tong Minh bryan.tongminh@gmail.com wrote:
See http://www.mediawiki.org/wiki/Manual:%24wgAPIModules: "Extension modules cannot override the core modules." Why is that? As far as I understand extension modules can override special pages, so why not api modules? It would be particularly useful for extension LuceneSearch. This extension overrides Special:Search and its (not yet committed) api module should also override list=search.
At least in the case of search, wouldn't it be better to modify the core module to be able to query different backends?
Stephen Bain schreef:
At least in the case of search, wouldn't it be better to modify the core module to be able to query different backends?
Ultimately, yes. As I said on wikitech-l, we need native support for Lucene (and other backends) in core. As long as we don't have it, the Lucene API module is a good temporary solution.
Roan Kattouw (Catrope)
Roan Kattouw wrote:
Stephen Bain schreef:
At least in the case of search, wouldn't it be better to modify the core module to be able to query different backends?
Ultimately, yes. As I said on wikitech-l, we need native support for Lucene (and other backends) in core.
There's *ALREADY* a plugin interface for search engines.
I made a sample plugin for Lucene a long long time ago, it's in extensions/MWSearch.
It needs to be brought up to date, and the base interfaces need to be checked over to ensure they provide all necessary interfaces.
-- brion vibber (brion @ wikimedia.org)
mediawiki-api@lists.wikimedia.org