Examples of field()


Examples of org.drools.guvnor.client.messages.Constants.Field()

        table.setWidget(0,
                0,
                vp);

        vp = new VerticalPanel();
        vp.add(new SmallLabel(constants.Field()));
        vp.add(fieldsCombo);
        table.setWidget(1,
                0,
                vp);
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest.field()

        }

        AnalyzeRequest analyzeRequest = new AnalyzeRequest(request.param("index"), text);
        analyzeRequest.preferLocal(request.paramAsBoolean("prefer_local", analyzeRequest.preferLocalShard()));
        analyzeRequest.analyzer(request.param("analyzer"));
        analyzeRequest.field(request.param("field"));
        client.admin().indices().analyze(analyzeRequest, new ActionListener<AnalyzeResponse>() {
            @Override public void onResponse(AnalyzeResponse response) {
                try {
                    XContentBuilder builder = restContentBuilder(request);
                    builder.startObject();
View Full Code Here

Examples of org.elasticsearch.action.get.GetResponse.field()

        for (int i = 0; i < 5; i++) {
            getResult = client1.prepareGet("test", "type1", "1").setFields("_source.type1.name").execute().actionGet();
            assertThat(getResult.index(), equalTo(getConcreteIndexName()));
            assertThat(getResult.exists(), equalTo(true));
            assertThat(getResult.source(), nullValue());
            assertThat(getResult.field("_source.type1.name").values().get(0).toString(), equalTo("test"));
        }

        logger.info("Get [type1/2] (should be empty)");
        for (int i = 0; i < 5; i++) {
            getResult = client1.get(getRequest("test").type("type1").id("2")).actionGet();
View Full Code Here

Examples of org.elasticsearch.common.lucene.search.RegexpFilter.field()

        Query parsedQuery = queryParser.parse(query).query();
        assertThat(parsedQuery, instanceOf(FilteredQuery.class));
        Filter filter = ((FilteredQuery) parsedQuery).getFilter();
        assertThat(filter, instanceOf(RegexpFilter.class));
        RegexpFilter regexpFilter = (RegexpFilter) filter;
        assertThat(regexpFilter.field(), equalTo("name.first"));
        assertThat(regexpFilter.regexp(), equalTo("s.*y"));
    }

    @Test
    public void testRegexpFilteredQueryWithMaxDeterminizedStates() throws IOException {
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentBuilder.field()

    Event event = EventBuilder.withBody(message.getBytes(charset));
    event.setHeaders(headers);

    XContentBuilder expected = jsonBuilder()
        .startObject();
            expected.field("@message", new String(message.getBytes(), charset));
            expected.field("@timestamp", new Date(timestamp));
            expected.field("@source", "flume_tail_src");
            expected.field("@type", "sometype");
            expected.field("@source_host", "test@localhost");
            expected.field("@source_path", "/tmp/test");
View Full Code Here

Examples of org.elasticsearch.index.get.GetResult.field()

        String operation = null;
        String timestamp;
        Long ttl = null;
        final Map<String, Object> updatedSourceAsMap;
        final XContentType updateSourceContentType = sourceAndContent.v1();
        String routing = getResult.getFields().containsKey(RoutingFieldMapper.NAME) ? getResult.field(RoutingFieldMapper.NAME).getValue().toString() : null;
        String parent = getResult.getFields().containsKey(ParentFieldMapper.NAME) ? getResult.field(ParentFieldMapper.NAME).getValue().toString() : null;

        if (request.script() == null && request.doc() != null) {
            IndexRequest indexRequest = request.doc();
            updatedSourceAsMap = sourceAndContent.v2();
View Full Code Here

Examples of org.elasticsearch.search.SearchHit.field()

              Object v = null;
              SearchHitField shf = null;
              if ("_source".equals(idx_resultField)) {
                v = hit.getSource();
              } else {
                shf = hit.field(idx_resultField);
                if (shf != null) {
                  v = shf.getValue();
                }
              }
              if (shf != null || v != null) {
View Full Code Here

Examples of org.elasticsearch.search.builder.SearchSourceBuilder.field()

                                        if (searchSourceBuilder == null) {
                                            searchSourceBuilder = new SearchSourceBuilder();
                                        }
                                        for (Object field : (List) mapQuery.get("fields")) {
                                            if (field instanceof String) {
                                                searchSourceBuilder.field((String) field);
                                            }
                                        }
                                    }

                                    SearchRequest searchRequest = new SearchRequest();
View Full Code Here

Examples of org.elasticsearch.search.facet.histogram.HistogramFacetBuilder.field()

    Assert.notNull(getName(), "Facet name can't be a null !!!");
    Assert.isTrue(StringUtils.isNotBlank(field), "Please select field on which to build the facet !!!");
    Assert.isTrue(interval > 0, "Please provide interval as positive value greater them zero !!!");

    HistogramFacetBuilder builder = FacetBuilders.histogramFacet(getName());
    builder.field(field);

    if (timeUnit != null) {
      builder.interval(interval, timeUnit);
    } else {
      builder.interval(interval);
View Full Code Here

Examples of org.elasticsearch.search.facet.range.RangeFacetBuilder.field()

    RangeFacetBuilder builder = FacetBuilders.rangeFacet(getName());
    if (StringUtils.isNotBlank(keyField)) {
      builder.keyField(keyField).valueField(valueField);
    } else {
      builder.field(field);
    }

    for (Entry entry : entries) {
      if (entry instanceof DoubleEntry) {
        DoubleEntry doubleEntry = (DoubleEntry) entry;
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.