Package com.araby.boss.search

Examples of com.araby.boss.search.SearchClient


    }

    @SuppressWarnings("deprecation")
    private static Map<Integer, Map<String, String>> getBossNewsSearch(String q) throws IOException, SearchException {

        SearchClient client = new SearchClient(API_KEY);

        NewsSearchRequest newsSerachRequest = new NewsSearchRequest(q);
        newsSerachRequest.setStart(BigInteger.valueOf(0));
        newsSerachRequest.setCount(30);

        NewsSearchResults results = client.newsSearch(newsSerachRequest);

        return results.getNewsSearchResultsAsMap();

    }
View Full Code Here


    }

    @SuppressWarnings("deprecation")
    private static Map<Integer, Map<String, String>> getBossImageSearch(String q) throws IOException, SearchException {

        SearchClient client = new SearchClient(API_KEY);

        ImageSearchRequest imgSerachRequest = new ImageSearchRequest(q);
        imgSerachRequest.setStart(BigInteger.valueOf(0));
        imgSerachRequest.setCount(30);

        ImageSearchResults results = client.imageSearch(imgSerachRequest);

        return results.getImageSearchResultsAsMap();

    }
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    private static Map<Integer, Map<String, String>> getBossWebSearch(String q) throws IOException, SearchException {
        SearchClient client = new SearchClient(API_KEY);

        WebSearchRequest webSerachRequest = new WebSearchRequest(q);
        webSerachRequest.setStart(BigInteger.valueOf(0));
        webSerachRequest.setCount(30);
        webSerachRequest.setSimilarOk(true);


        WebSearchResults results = client.webSearch(webSerachRequest);

        return results.getWebSearchResultsAsMap();

    }
View Full Code Here

        return results.getWebSearchResultsAsMap();

    }

    private static String getBossSuggestionSearch(String q) throws IOException, SearchException {
        SearchClient client = new SearchClient(API_KEY);

        SpellingSuggestionRequest spellSerachRequest = new SpellingSuggestionRequest(q);

        SpellingSuggestionResults result = client.spellingSuggestion(spellSerachRequest);

        return result.getSuggestion();
    }
View Full Code Here

TOP

Related Classes of com.araby.boss.search.SearchClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.