当前位置: 首页>>代码示例>>Java>>正文


Java ShapeRelation.getRelationByName方法代码示例

本文整理汇总了Java中org.elasticsearch.common.geo.ShapeRelation.getRelationByName方法的典型用法代码示例。如果您正苦于以下问题:Java ShapeRelation.getRelationByName方法的具体用法?Java ShapeRelation.getRelationByName怎么用?Java ShapeRelation.getRelationByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.common.geo.ShapeRelation的用法示例。


在下文中一共展示了ShapeRelation.getRelationByName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RangeQueryBuilder

import org.elasticsearch.common.geo.ShapeRelation; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public RangeQueryBuilder(StreamInput in) throws IOException {
    super(in);
    fieldName = in.readString();
    from = in.readGenericValue();
    to = in.readGenericValue();
    includeLower = in.readBoolean();
    includeUpper = in.readBoolean();
    timeZone = in.readOptionalTimeZone();
    String formatString = in.readOptionalString();
    if (formatString != null) {
        format = Joda.forPattern(formatString);
    }
    if (in.getVersion().onOrAfter(Version.V_5_2_0_UNRELEASED)) {
        String relationString = in.readOptionalString();
        if (relationString != null) {
            relation = ShapeRelation.getRelationByName(relationString);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:23,代码来源:RangeQueryBuilder.java

示例2: convert

import org.elasticsearch.common.geo.ShapeRelation; //导入方法依赖的package包/类
@Override
public QueryBuilder convert(Filter filter) {
    String field = filter.getString("field");
    Geometry geometry = filter.get(Geometry.class, "geometry");
    String relationName = filter.getString("relation");
    ShapeBuilder shapeBuilder = ShapeBuilderUtil.toShapeBuilder(geometry);
    ShapeRelation shapeRelation = ShapeRelation.getRelationByName(relationName);
    return QueryBuilders.geoShapeQuery(field, shapeBuilder, shapeRelation);
}
 
开发者ID:scaleset,项目名称:scaleset-search,代码行数:10,代码来源:GeoShapeFilterConverter.java

示例3: convert

import org.elasticsearch.common.geo.ShapeRelation; //导入方法依赖的package包/类
@Override
public FilterBuilder convert(Filter filter) {
    String field = filter.getString("field");
    Geometry geometry = filter.get(Geometry.class, "geometry");
    String relationName = filter.getString("relation");
    ShapeBuilder shapeBuilder = ShapeBuilderUtil.toShapeBuilder(geometry);
    ShapeRelation shapeRelation = ShapeRelation.getRelationByName(relationName);
    FilterBuilder result = FilterBuilders.geoShapeFilter(field, shapeBuilder, shapeRelation);
    return result;
}
 
开发者ID:scaleset,项目名称:scaleset-search,代码行数:11,代码来源:GeoShapeFilterConverter.java


注:本文中的org.elasticsearch.common.geo.ShapeRelation.getRelationByName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。