Examples of startArray()


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

                            builder.field(Fields.OK, true);
                        }
                        if (itemResponse.response() instanceof IndexResponse) {
                            IndexResponse indexResponse = itemResponse.response();
                            if (indexResponse.matches() != null) {
                                builder.startArray(Fields.MATCHES);
                                for (String match : indexResponse.matches()) {
                                    builder.value(match);
                                }
                                builder.endArray();
                            }
View Full Code Here

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

        XContentBuilder builder = channel.newBuilder().startObject();
        builder.startObject();
        builder.field("word", word);
        builder.field("wordType", wordType);
        if (wordType != HebrewAnalyzer.WordType.UNRECOGNIZED && wordType != HebrewAnalyzer.WordType.NON_HEBREW) {
            builder.startArray("lemmas");
            for (String lemma : getLemmas(word)) {
                builder.value(lemma);
            }
            builder.endArray();
        }
View Full Code Here

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

        XContentBuilder builder = JsonXContent.contentBuilder();
        builder.startObject();
        for (IndexMetaData indexMetaData : response.getState().metaData()) {
            builder.startObject(indexMetaData.index());
            if (indexMetaData.aliases() != null && indexMetaData.aliases().size() > 0) {
                builder.startArray("aliases");
                for (String alias : indexMetaData.aliases().keySet()) {
                    builder.value(alias);
                }
                builder.endArray();
            }
View Full Code Here

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

                    builder.value(alias);
                }
                builder.endArray();
            }
            if (indexMetaData.mappings() != null && indexMetaData.mappings().size() > 0) {
                builder.startArray("types");
                for (String alias : indexMetaData.mappings().keySet()) {
                    builder.value(alias);
                }
                builder.endArray();
            }
View Full Code Here

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

    }

    if (commentIndexingMode == IssueCommentIndexingMode.EMBEDDED) {
      List<Map<String, Object>> comments = extractIssueComments(issue);
      if (comments != null && !comments.isEmpty()) {
        out.startArray(indexFieldForComments);
        for (Map<String, Object> comment : comments) {
          out.startObject();
          addCommonFieldsToCommentIndexedDocument(out, issueKey, comment);
          out.endObject();
        }
View Full Code Here

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

      }
    }
    if (changelogIndexingMode == IssueCommentIndexingMode.EMBEDDED) {
      List<Map<String, Object>> changelogs = extractIssueChangelogs(issue);
      if (changelogs != null && !changelogs.isEmpty()) {
        out.startArray(indexFieldForChangelogs);
        for (Map<String, Object> changelog : changelogs) {
          out.startObject();
          addCommonFieldsToChangelogIndexedDocument(out, issueKey, changelog);
          out.endObject();
        }
View Full Code Here

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

      builder.endObject();
    }
    if (coordinatorInstance != null) {
      List<ProjectIndexingInfo> currProjectIndexingInfo = coordinatorInstance.getCurrentProjectIndexingInfo();
      if (currProjectIndexingInfo != null) {
        builder.startArray("current_indexing");
        for (ProjectIndexingInfo pi : currProjectIndexingInfo) {
          pi.buildDocument(builder, true, false);
        }
        builder.endArray();
      }
View Full Code Here

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

        builder.endArray();
      }
    }
    List<String> pkeys = getAllIndexedProjectsKeys();
    if (pkeys != null) {
      builder.startArray("indexed_jira_projects");
      for (String projectKey : pkeys) {
        builder.startObject();
        builder.field("project_key", projectKey);
        ProjectIndexingInfo lastIndexing = getLastProjectIndexingInfo(projectKey);
        if (lastIndexing != null) {
View Full Code Here

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

                out.endObject();
            }
        }

        if (message.getCategories() != null && message.getCategories().size() > 0) {
            out.startArray(Rss.CATEGORIES);
            for (Object oCategory : message.getCategories()) {
                if (oCategory instanceof SyndCategory) {
                    SyndCategory category = (SyndCategory) oCategory;
                    out.value(category.getName());
                }
View Full Code Here

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

            }
            out.endArray();
        }

        if (message.getEnclosures() != null && message.getEnclosures().size() > 0) {
            out.startArray(Rss.ENCLOSURES);
            for (Object oEnclosure : message.getEnclosures()) {
                if (oEnclosure instanceof SyndEnclosure) {
                    out.startObject();
                    SyndEnclosure enclosure = (SyndEnclosure) oEnclosure;
                    out.field(Rss.Enclosures.URL, enclosure.getUrl());
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.