Examples of withQuery()


Examples of com.bluetangstudio.searchcloud.client.utils.SearchQueryBuilder.withQuery()

     * @throws IOException
     */
    @Test
    public void testSerialization() throws IOException {
        SearchQueryBuilder builder = new SearchQueryBuilder();
        SearchQuery searchQuery = builder.withQuery(new KeywordQuery("f", "v")).withConstraint(
                new KeywordQueryConstraint("c", "d")).withPagination(new Pagination()).build();
        String jsonString = SerializationUtils.toJson(searchQuery);

        Assert.assertEquals(jsonString, "{\"queries\":[{\"@type\":\"keyword\",\"field\":\"f\",\"keyword\":\"v\"}],"
                + "\"constraints\":[{\"@type\":\"keyword\",\"field\":\"c\",\"keyword\":\"d\"}],"
View Full Code Here

Examples of com.google.code.bing.search.client.BingSearchClient.SearchRequestBuilder.withQuery()

  private static SearchRequest createSearchRequest
                (BingSearchClient client, String applicationId, String query)
        {
    SearchRequestBuilder builder = client.newSearchRequestBuilder();
    builder.withAppId(applicationId);
    builder.withQuery(query);
    builder.withSourceType(SourceType.WEB);
    builder.withVersion("2.0");
    builder.withMarket("en-us");
    builder.withAdultOption(AdultOption.STRICT);
    builder.withSearchOption(SearchOption.ENABLE_HIGHLIGHTING);
View Full Code Here

Examples of io.mola.galimatias.URL.withQuery()

            output = output
                    .withUsername(decodeUnreserved(output.username()))
                    .withPassword(decodeUnreserved(output.password()))
                    .withPath(decodeUnreserved(output.path()));
        }
        return output
                .withQuery(decodeUnreserved(output.query()))
                .withFragment(decodeUnreserved(output.fragment()));
    }

    private String decodeUnreserved(final String input) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.