Kanchanfisky / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

Suggestions #119

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Currently, I'm doing a "blind search" and eventually I got some suggestions 
(actually, I don't know if api provides more than one suggestion). It will be 
nice if we can handle this suggestions on some way.

What is the expected output? What do you see instead?
Similar to the list of results.

What version of the product are you using? On what operating system?
I'm working from trunk version. iOS.

Please provide any additional information below.
Not all responses have a suggestion attribute on searchinfo

Original issue reported on code.google.com by aavendan on 26 Oct 2012 at 9:33

GoogleCodeExporter commented 8 years ago
I made changes ( r7584 r7585 ) in the sendXML() method to allow public access.

In the following example the search suggestions are returned in JSON format 
from an opensearch action.
Is this what you want to achieve?

{{{
package info.bliki.api;

import info.bliki.api.query.OpenSearch;
import info.bliki.api.query.RequestBuilder;

/**
 * Example for querying the open search interface
 */
public class QueryOpenSearchExample {
    public static void main(String[] args) {
        User user = new User("", "", "http://en.wikipedia.org/w/api.php");
        Connector connector = new Connector();
        user = connector.login(user);

        RequestBuilder request = OpenSearch.create().search("test").format("json");
        String jsonResponse = connector.sendXML(user, request);
        System.out.println(jsonResponse);
    }

}
}}}

Original comment by axelclk@gmail.com on 26 Oct 2012 at 3:09

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 26 Oct 2012 at 3:09

GoogleCodeExporter commented 8 years ago
Actually, I was not talking about Opensearch, but thanks! it solve my problem.

I was talking about API:Search http://www.mediawiki.org/wiki/API:Search
One of the attributes on searchinfo tag is "suggestion", in order to refine the 
search (maybe there exists something similar but with terms on different order)

btw, great work with!

Original comment by aavendan on 27 Oct 2012 at 10:23

GoogleCodeExporter commented 8 years ago
Is there any way to do a search with gwtwiki without using the latest SVN trunk 
with that patch?  It seems like the last release doesn't support this (it's 
still private), and I've no idea when the next release will be.

Original comment by marcus.t...@netseer.com on 21 Jun 2013 at 2:26