Package com.bluetangstudio.searchcloud.client.utils

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

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.