public synchronized boolean onSuccess(final String nodeName,
                                          final InputStream inputStream) {
        // If we have already completed the finish immediately without worrying about this data.
        if (isComplete()) {
            return true;
        }
        boolean complete = true;

        final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        StreamUtil.streamToStream(inputStream, byteArrayOutputStream);

        try (final Input input = new Input(new ByteArrayInputStream(byteArrayOutputStream.toByteArray()))) {
            final ErrorConsumer errorConsumer = getErrorConsumer(nodeName);
            complete = NodeResultSerialiser.read(input, coprocessors, errorConsumer);
        } catch (final KryoException e) {
            // Expected as sometimes the output stream is closed by the receiving node.
            LOGGER.debug(e::getMessage, e);
        } catch (final RuntimeException e) {
            onFailure(nodeName, e);
        }

        // If the result collector rejected the result it is because we have already collected enough data and can
        // therefore consider search complete.
        return isComplete() || complete;
    }
Stop searching and destroy any stored data.
stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/ResultStore.java