Package io.searchbox.client

Examples of io.searchbox.client.JestResult


    @Before
    public void setup() {
        JsonParser jsonParser = new JsonParser();
        searchResultParser = new SearchResultParser();
        JestResult jestResult = new JestResult();
        jestResult.setJsonObject(jsonParser.parse(RESULT_STRING).getAsJsonObject());

        Pageable pageable = new PageRequest(1, 10);
        searchResults = searchResultParser.parseResults(jestResult, pageable, "search term");
    }
View Full Code Here


    @Before
    public void setup() {
        JsonParser jsonParser = new JsonParser();
        searchResultParser = new SearchResultParser();
        JestResult jestResult = new JestResult();
        jestResult.setJsonObject(jsonParser.parse(RESULT_STRING).getAsJsonObject());

        Pageable pageable = new PageRequest(1, 10);
        content = searchResultParser.parseResults(jestResult, pageable, "search term").getPage().getContent();
    }
View Full Code Here

        return settings;
    }

    private JestResult execute(Action action) {
        try {
            JestResult result = jestClient.execute(action);
            logger.debug(result.getJsonString());
            return result;
        } catch (Exception e) {
            throw new SearchException(e);
        }
    }
View Full Code Here

                .setDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").create();
    }

    JestResult safeResult() {
        if (result == null) {
            result = new JestResult(gson);
            safeResult().setJsonObject(new JsonObject());
            safeResult().setSucceeded(false);
        }
        return result;
    }
View Full Code Here

        return execute(jestRequest.getAction());
    }

    @NotNull
    public static JestRichResult execute(final Action action){
        JestResult jestResult;
        try {
            jestResult = IndexClient.client.execute(action);
        } catch (Exception e) {
            jestResult = null;
            Logger.error("ElasticSearch : Unable to execute request {}", e);
View Full Code Here

                .setDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").create();
    }

    JestResult safeResult() {
        if (result == null) {
            result = new JestResult(gson);
            safeResult().setJsonObject(new JsonObject());
            safeResult().setSucceeded(false);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of io.searchbox.client.JestResult

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.