gpt4 book ai didi

org.elasticsearch.common.xcontent.XContentLocation类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 03:57:40 28 4
gpt4 key购买 nike

本文整理了Java中org.elasticsearch.common.xcontent.XContentLocation类的一些代码示例,展示了XContentLocation类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XContentLocation类的具体详情如下:
包路径:org.elasticsearch.common.xcontent.XContentLocation
类名称:XContentLocation

XContentLocation介绍

[英]Simple data structure representing the line and column number of a position in some XContent e.g. JSON. Locations are typically used to communicate the position of a parsing error to end users and consequently have line and column numbers starting from 1.
[中]简单的数据结构,表示某个位置在某些XContent中的行号和列号,例如JSON。位置通常用于向最终用户传达解析错误的位置,因此行号和列号从1开始。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

throw new ParsingException(new XContentLocation(e.getLineNumber(), e.getColumnNumber()),
    "no [query] registered for [" + queryName + "]");

代码示例来源:origin: org.elasticsearch.plugin/reindex-client

private Throwable buildWithoutCause() {
  requireNonNull(type, "[type] is required");
  requireNonNull(reason, "[reason] is required");
  switch (type) {
  // Make some effort to use the right exceptions
  case "es_rejected_execution_exception":
    return new EsRejectedExecutionException(reason);
  case "parsing_exception":
    XContentLocation location = null;
    if (line != null && column != null) {
      location = new XContentLocation(line, column);
    }
    return new ParsingException(location, reason);
  // But it isn't worth trying to get it perfect....
  default:
    return new RuntimeException(type + ": " + reason);
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public XContentLocation getTokenLocation() {
  JsonLocation loc = parser.getTokenLocation();
  if (loc == null) {
    return null;
  }
  return new XContentLocation(loc.getLineNr(), loc.getColumnNr());
}

代码示例来源:origin: harbby/presto-connectors

@Override
public XContentLocation getTokenLocation() {
  JsonLocation loc = parser.getTokenLocation();
  if (loc == null) {
    return null;
  }
  return new XContentLocation(loc.getLineNr(), loc.getColumnNr());
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public XContentLocation getTokenLocation() {
  JsonLocation loc = parser.getTokenLocation();
  if (loc == null) {
    return null;
  }
  return new XContentLocation(loc.getLineNr(), loc.getColumnNr());
}

代码示例来源:origin: org.elasticsearch/elasticsearch-x-content

@Override
public XContentLocation getTokenLocation() {
  JsonLocation loc = parser.getTokenLocation();
  if (loc == null) {
    return null;
  }
  return new XContentLocation(loc.getLineNr(), loc.getColumnNr());
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

throw new ParsingException(new XContentLocation(e.getLineNumber(), e.getColumnNumber()),
    "no [query] registered for [" + queryName + "]");

代码示例来源:origin: apache/servicemix-bundles

throw new ParsingException(new XContentLocation(e.getLineNumber(), e.getColumnNumber()),
    "no [query] registered for [" + queryName + "]");

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

throw new ParsingException(new XContentLocation(e.getLineNumber(), e.getColumnNumber()),
    "no [query] registered for [" + e.getName() + "]");

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com