我想使用GSAClient访问我们公司的Google Search Appliance项目并检索搜索结果,但我根本无法使用该配置。
网络用户界面为:http://kb.juniper.net
因此,为了使GSAClientDemo正常工作,我该如何设置:
我是否需要向GSA管理员询问设置?
// target GSA's hostname
private static final String HOSTNAME = "kb.juniper.net";
// query string to search for
private static final String QUERY_STRING = "juno";
// The value for the frontend configured for the GSA
// (If you dont know this, ask GSA admin for correct value for your target GSA.)
private static final String SETTING_FRONTEND = "InfoCenter";
public static void main(String[] args) throws IOException {
GSAClient client = new GSAClient(HOSTNAME);
GSAQuery query = new GSAQuery();
// typical way to generate query term.
GSAQueryTerm term = new GSAQueryTerm(QUERY_STRING);
query.setQueryTerm(term);
System.out.println("Searching for: "+query.getQueryString());
答案 0 :(得分:0)
答案 1 :(得分:0)
我是否需要向GSA管理员询问设置?
是。您需要向您的GSA管理员查询HOST和front_end信息。只有他们可以告诉你。除非,您知道如何使用GSA并且允许自己获取信息。