List of usage examples for org.apache.lucene.spatial.prefix TermQueryPrefixTreeStrategy TermQueryPrefixTreeStrategy
public TermQueryPrefixTreeStrategy(SpatialPrefixTree grid, String fieldName)
From source file:org.apache.solr.schema.SpatialTermQueryPrefixTreeFieldType.java
License:Apache License
@Override protected TermQueryPrefixTreeStrategy newPrefixTreeStrategy(String fieldName) { return new TermQueryPrefixTreeStrategy(grid, fieldName); }
From source file:org.elasticsearch.common.geo.SpatialStrategy.java
License:Apache License
public PrefixTreeStrategy create(SpatialPrefixTree grid, String fieldName) { if (this == TERM) { return new TermQueryPrefixTreeStrategy(grid, fieldName); }/*from w ww . j a v a 2 s.co m*/ return new RecursivePrefixTreeStrategy(grid, fieldName); }
From source file:org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper.java
License:Apache License
public GeoShapeFieldMapper(FieldMapper.Names names, SpatialPrefixTree tree, String defaultStrategyName, double distanceErrorPct, FieldType fieldType, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, MultiFields multiFields, CopyTo copyTo) { super(names, 1, fieldType, null, null, null, postingsProvider, docValuesProvider, null, null, null, null, multiFields, copyTo);/*ww w . jav a2 s . c o m*/ this.recursiveStrategy = new RecursivePrefixTreeStrategy(tree, names.indexName()); this.recursiveStrategy.setDistErrPct(distanceErrorPct); this.termStrategy = new TermQueryPrefixTreeStrategy(tree, names.indexName()); this.termStrategy.setDistErrPct(distanceErrorPct); this.defaultStrategy = resolveStrategy(defaultStrategyName); }