public class GeoShapeFieldMapper extends AbstractFieldMapper<String>
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] ]
]
}Modifier and Type | Class and Description |
---|---|
static class |
GeoShapeFieldMapper.Builder |
static class |
GeoShapeFieldMapper.Defaults |
static class |
GeoShapeFieldMapper.Names |
static class |
GeoShapeFieldMapper.TypeParser |
AbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFields
FieldMapper.Loading
Mapper.BuilderContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
boost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarity
DOC_VALUES_FORMAT
EMPTY_ARRAY
EMPTY_PARAMS
Constructor and Description |
---|
GeoShapeFieldMapper(FieldMapper.Names names,
org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree tree,
String defaultStrategyName,
double distanceErrorPct,
ShapeBuilder.Orientation shapeOrientation,
org.apache.lucene.document.FieldType fieldType,
PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider,
AbstractFieldMapper.MultiFields multiFields,
AbstractFieldMapper.CopyTo copyTo) |
Modifier and Type | Method and Description |
---|---|
protected String |
contentType() |
FieldDataType |
defaultFieldDataType() |
org.apache.lucene.document.FieldType |
defaultFieldType() |
org.apache.lucene.spatial.prefix.PrefixTreeStrategy |
defaultStrategy() |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
boolean |
hasDocValues() |
void |
merge(Mapper mergeWith,
MergeContext mergeContext) |
ShapeBuilder.Orientation |
orientation() |
void |
parse(ParseContext context) |
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields . |
org.apache.lucene.spatial.prefix.PrefixTreeStrategy |
recursiveStrategy() |
org.apache.lucene.spatial.prefix.PrefixTreeStrategy |
resolveStrategy(String strategyName) |
org.apache.lucene.spatial.prefix.PrefixTreeStrategy |
termStrategy() |
String |
value(Object value)
Returns the actual value of the field.
|
boost, close, copyTo, customBoost, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, fieldDataTermsFilter, fieldDataType, fieldType, fuzzyQuery, indexAnalyzer, indexedValueForSearch, indexOptionToString, indexTokenizeOptionToString, isGenerated, isNumeric, isSortable, name, names, normsLoading, nullValueFilter, postingsFormatProvider, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, regexpFilter, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, supportsNullValue, termFilter, termQuery, termsFilter, termVectorOptionsToString, toXContent, traverse, traverse, useTermQueryWithQueryString, valueForSearch
public static final String CONTENT_TYPE
public GeoShapeFieldMapper(FieldMapper.Names names, org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree tree, String defaultStrategyName, double distanceErrorPct, ShapeBuilder.Orientation shapeOrientation, org.apache.lucene.document.FieldType fieldType, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, AbstractFieldMapper.MultiFields multiFields, AbstractFieldMapper.CopyTo copyTo)
public org.apache.lucene.document.FieldType defaultFieldType()
defaultFieldType
in class AbstractFieldMapper<String>
public FieldDataType defaultFieldDataType()
defaultFieldDataType
in class AbstractFieldMapper<String>
public boolean hasDocValues()
hasDocValues
in interface FieldMapper<String>
hasDocValues
in class AbstractFieldMapper<String>
public void parse(ParseContext context) throws IOException
parse
in interface Mapper
parse
in class AbstractFieldMapper<String>
IOException
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class AbstractFieldMapper<String>
MergeMappingException
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapper
fields
.parseCreateField
in class AbstractFieldMapper<String>
IOException
protected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody
in class AbstractFieldMapper<String>
IOException
protected String contentType()
contentType
in class AbstractFieldMapper<String>
public String value(Object value)
FieldMapper
public org.apache.lucene.spatial.prefix.PrefixTreeStrategy defaultStrategy()
public org.apache.lucene.spatial.prefix.PrefixTreeStrategy recursiveStrategy()
public org.apache.lucene.spatial.prefix.PrefixTreeStrategy termStrategy()
public ShapeBuilder.Orientation orientation()
public org.apache.lucene.spatial.prefix.PrefixTreeStrategy resolveStrategy(String strategyName)
Copyright © 2009–2015. All rights reserved.