Examples of BytesReference


Examples of org.elasticsearch.common.bytes.BytesReference

                DataTypes.BOOLEAN),
                Arrays.<Symbol>asList(minScore_ref, Literal.newLiteral(0.4))
        );
        QueryThenFetchNode node = new QueryThenFetchNode(new Routing(),
                ImmutableList.<Symbol>of(), null, null, null, null, null, new WhereClause(whereClause), null);
        BytesReference bytesReference = generator.convert(node);

        assertThat(bytesReference.toUtf8(),
                is("{\"_source\":false,\"query\":{\"match_all\":{}},\"min_score\":0.4,\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

                null,
                null,
                new WhereClause(whereClause),
                null);

        BytesReference reference = generator.convert(searchNode);
        String actual = reference.toUtf8();
        assertThat(actual, is(
                "{\"_source\":{\"include\":[\"name\"]},\"query\":{\"term\":{\"name\":\"Marvin\"}},\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

        ESDeleteByQueryNode deleteByQueryNode = new ESDeleteByQueryNode(
                new String[]{characters.name()},
                new WhereClause(whereClause));

        BytesReference reference = generator.convert(deleteByQueryNode);
        String actual = reference.toUtf8();
        assertThat(actual, is("{\"query\":{\"term\":{\"name\":\"Marvin\"}}}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

                null,
                null,
                WhereClause.MATCH_ALL,
                null);

        BytesReference reference = generator.convert(searchNode);
        String actual = reference.toUtf8();
        assertThat(actual, is(
                "{\"version\":true,\"_source\":false,\"query\":{\"match_all\":{}},\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

                null,
                null,
                WhereClause.MATCH_ALL,
                null);

        BytesReference reference = generator.convert(searchNode);
        String actual = reference.toUtf8();
        assertThat(actual, is(
                "{\"_source\":{\"include\":[\"author\"]},\"query\":{\"match_all\":{}},\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

                null,
                null,
                WhereClause.MATCH_ALL,
                Arrays.asList(weight_ref.info()));

        BytesReference reference = generator.convert(searchNode);
        String actual = reference.toUtf8();
        assertThat(actual, is(
                "{\"_source\":{\"include\":[\"name\"]},\"query\":{\"match_all\":{}},\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

                new Boolean[] { null },
                null,
                null,
                WhereClause.MATCH_ALL,
                null);
        BytesReference reference = generator.convert(searchNode);
        String actual = reference.toUtf8();
        assertThat(actual, is(
                "{\"_source\":{\"include\":[\"name\"]},\"query\":{\"match_all\":{}},\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

                new Boolean[] { null },
                null,
                null,
                WhereClause.MATCH_ALL,
                null);
        BytesReference reference = generator.convert(searchNode);
        String actual = reference.toUtf8();
        assertThat(actual, is(
                "{\"_source\":{\"include\":[\"name\"]},\"query\":{\"match_all\":{}}," +
                        "\"from\":0,\"size\":10000}"));
    }
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

    }

    @Override
    public boolean setNextRow(Object... row) {
        String indexName;
        BytesReference source;
        String id;
        String clusteredByValue = null;

        synchronized (lock) {
            for (CollectExpression<?> collectExpression : collectExpressions) {
View Full Code Here

Examples of org.elasticsearch.common.bytes.BytesReference

            if (value == null) {
                return null;
            }
            Map<String, Object> filteredMap = XContentMapValues.filter(value, includes, excludes);
            try {
                BytesReference bytes = new XContentBuilder(Requests.INDEX_CONTENT_TYPE.xContent(),
                        new BytesStreamOutput(lastSourceSize)).map(filteredMap).bytes();
                lastSourceSize = bytes.length();
                return bytes;
            } catch (IOException ex) {
                logger.error("could not parse xContent", ex);
            }
            return null;
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.