Examples of startObject()


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

    }
    List<String> pkeys = getAllIndexedSpaceKeys();
    if (pkeys != null) {
      builder.startArray("indexed_spaces");
      for (String spaceKey : pkeys) {
        builder.startObject();
        builder.field(SpaceIndexingInfo.DOCFIELD_SPACE_KEY, spaceKey);
        SpaceIndexingInfo lastIndexing = getLastSpaceIndexingInfo(spaceKey);
        if (lastIndexing != null) {
          builder.field("last_indexing");
          lastIndexing.buildDocument(builder, false, true);
View Full Code Here

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

    if (commentIndexingMode == CommentIndexingMode.EMBEDDED) {
      List<Map<String, Object>> comments = extractComments(documentRemote);
      if (comments != null && !comments.isEmpty()) {
        out.startArray(indexFieldForComments);
        for (Map<String, Object> comment : comments) {
          out.startObject();
          addCommonFieldsToCommentIndexedDocument(out, documentId, comment);
          out.endObject();
        }
        out.endArray();
      }
View Full Code Here

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

   * @return document with message
   * @throws IOException
   */
  public static XContentBuilder buildMessageDocument(RestRequest restRequest, String message) throws IOException {
    XContentBuilder builder = RestXContentBuilder.restContentBuilder(restRequest);
    builder.startObject();
    builder.field("message", message);
    builder.endObject();
    return builder;
  }

View Full Code Here

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

                  allRivers.addAll(node.getRiverNames());
                }
              }

              XContentBuilder builder = restChannel.newBuilder();
              builder.startObject();
              builder.field("river_names", allRivers);
              builder.endObject();
              restChannel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
            } catch (Exception e) {
              onFailure(e);
View Full Code Here

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

   */
  @Override
  public String getRiverOperationInfo(DiscoveryNode esNode, Date currentDate) throws Exception {

    XContentBuilder builder = jsonBuilder().prettyPrint();
    builder.startObject();
    builder.field("river_name", riverName().getName());
    builder.field("info_date", currentDate);
    builder.startObject("indexing");
    builder.field("state", closed ? "stopped" : "running");
    if (!closed)
View Full Code Here

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

    XContentBuilder builder = jsonBuilder().prettyPrint();
    builder.startObject();
    builder.field("river_name", riverName().getName());
    builder.field("info_date", currentDate);
    builder.startObject("indexing");
    builder.field("state", closed ? "stopped" : "running");
    if (!closed)
      builder.field("last_restart", lastRestartDate);
    else if (permanentStopDate != null)
      builder.field("stopped_permanently", permanentStopDate);
View Full Code Here

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

      builder.field("last_restart", lastRestartDate);
    else if (permanentStopDate != null)
      builder.field("stopped_permanently", permanentStopDate);
    builder.endObject();
    if (esNode != null) {
      builder.startObject("node");
      builder.field("id", esNode.getId());
      builder.field("name", esNode.getName());
      builder.endObject();
    }
    if (coordinatorInstance != null) {
View Full Code Here

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

    }
    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) {
          builder.field("last_indexing");
          lastIndexing.buildDocument(builder, false, true);
View Full Code Here

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

    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();
        }
        out.endArray();
      }
View Full Code Here

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

    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();
        }
        out.endArray();
      }
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.