Brion Vibber schreef: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > As we're getting more of the enhanced Lucene search server's > capabilities exposed to the web UI, it might be good if we can make sure > they're exposed to the API as well. > > I received a request recently specifically about the "did you mean" > feature for spelling corrections of search terms. Internally this is > exposed as the hasSuggestion(), getSuggestionQuery(), and > getSuggestionSnippet() methods on the search result set object for > search engine backends that support it. > > Being able to return this via the API could be rather handy... > I'll try to poke at this some time this week, although I can't make any promises (I've been busy lately, there's virtually no time left for me to do MW stuff on Mon-Thu). > Do we have a standard way to return a query-specific bit of metadata > with the alternate search term suggestion as well as the list of > individual results? No. I'll invent one :) Yuri's suggestion looks good, although I'm wary of CamelCase in XML tags (but that's just a minor detail). I'll probably make this optional through srprop=suggestions.
Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
