Package com.bluetangstudio.searchcloud.client.utils

Examples of com.bluetangstudio.searchcloud.client.utils.SearchQueryBuilder


     *
     * @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


*/
public class SearchRequestBuilderTest extends RequestBuilderTestBase {

    @Test
    public void buildHttpUriRequest() {
        SearchRequest search = new SearchRequest("SearchRequestBuilderTest", new SearchQueryBuilder().build());
        setTrackingVariables(search);
        search.setFields("fields");


        SearchRequestBuilder builder = new SearchRequestBuilder();
View Full Code Here

TOP

Related Classes of com.bluetangstudio.searchcloud.client.utils.SearchQueryBuilder

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.