org.elasticsearch.index.mapper.geo
Class GeoShapeFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.core.AbstractFieldMapper<String>
org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<String>, Mapper
public class GeoShapeFieldMapper
- extends AbstractFieldMapper<String>
FieldMapper for indexing Shape
s.
Currently Shapes can only be indexed and can only be queried using
GeoShapeFilterParser
, consequently
a lot of behavior in this Mapper is disabled.
Format supported:
"field" : {
"type" : "polygon",
"coordinates" : [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
]
}
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper |
analyzed, boost, close, customBoost, fieldDataType, fieldFilter, fieldQuery, fuzzyQuery, fuzzyQuery, index, indexAnalyzer, indexed, indexedValue, indexOptions, indexOptionToString, merge, name, names, nullValueFilter, omitNorms, parse, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, toXContent, traverse, traverse, useFieldQueryWithQueryString, valueForSearch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
SPATIAL_CONTEXT
public static final com.spatial4j.core.context.SpatialContext SPATIAL_CONTEXT
GeoShapeFieldMapper
public GeoShapeFieldMapper(FieldMapper.Names names,
SpatialPrefixTree prefixTree,
double distanceErrorPct)
parseCreateField
protected org.apache.lucene.document.Fieldable parseCreateField(ParseContext context)
throws IOException
- Specified by:
parseCreateField
in class AbstractFieldMapper<String>
- Throws:
IOException
doXContentBody
protected void doXContentBody(XContentBuilder builder)
throws IOException
- Overrides:
doXContentBody
in class AbstractFieldMapper<String>
- Throws:
IOException
contentType
protected String contentType()
- Specified by:
contentType
in class AbstractFieldMapper<String>
value
public String value(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
FieldMapper
- Returns the actual value of the field.
valueFromString
public String valueFromString(String value)
valueAsString
public String valueAsString(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
FieldMapper
- Returns the actual value of the field as string.
spatialStrategy
public SpatialStrategy spatialStrategy()
Copyright © 2009-2012. All Rights Reserved.