IMHO we can just add another element next to <search>, like <searchSuggestions>

http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=meaning
returns

<api>
...
  <query>
    <search>
      <p ns="0" title="Meaning" />
      <p ns="0" title="Semantics" />
...
    </search>
    <searchSuggestions>
      <s>suggestion1</s>
      <s>suggestion2</s>
    </searchSuggestions>
...


On Sun, Nov 16, 2008 at 9:00 PM, Brion Vibber <[EMAIL PROTECTED]> wrote:
> -----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...
>
> 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?
>
> - -- brion
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkkg0DsACgkQwRnhpk1wk46YtwCfXagP/ulHKhbPewFHhK3/m77O
> atEAniP/891lp+qfFBQtJIwEV7HqdG8s
> =WSCv
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Mediawiki-api mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to