move geo handling (filter) into the index package from common.lucene since it uses field data and not really only dependant on lucene constucts

This commit is contained in:
kimchy 2010-10-16 12:30:20 +02:00
parent 1587a3815e
commit cc3a1dbe90
30 changed files with 40 additions and 40 deletions

View File

@ -19,7 +19,7 @@
package org.elasticsearch.index.mapper.xcontent.geo;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.index.search.geo.GeoHashUtils;
/**
* @author kimchy (shay.banon)

View File

@ -20,12 +20,12 @@
package org.elasticsearch.index.mapper.xcontent.geo;
import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.thread.ThreadLocals;
import org.elasticsearch.common.trove.TDoubleArrayList;
import org.elasticsearch.index.field.data.FieldData;
import org.elasticsearch.index.field.data.FieldDataType;
import org.elasticsearch.index.field.data.support.FieldDataLoader;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import java.io.IOException;

View File

@ -21,7 +21,6 @@ package org.elasticsearch.index.mapper.xcontent.geo;
import org.apache.lucene.document.Field;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
@ -31,6 +30,7 @@ import org.elasticsearch.index.mapper.FieldMapperListener;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.MergeMappingException;
import org.elasticsearch.index.mapper.xcontent.*;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import java.io.IOException;
import java.util.Map;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.index.mapper.xcontent.geo;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.thread.ThreadLocals;
import org.elasticsearch.index.field.data.doubles.DoubleFieldData;
import org.elasticsearch.index.search.geo.GeoHashUtils;
/**
* @author kimchy (shay.banon)

View File

@ -19,9 +19,9 @@
package org.elasticsearch.index.mapper.xcontent.geo;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.thread.ThreadLocals;
import org.elasticsearch.index.field.data.doubles.DoubleFieldData;
import org.elasticsearch.index.search.geo.GeoHashUtils;
/**
* @author kimchy (shay.banon)

View File

@ -19,9 +19,9 @@
package org.elasticsearch.index.query.xcontent;
import org.elasticsearch.common.lucene.geo.GeoBoundingBoxFilter;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.query.QueryBuilderException;
import org.elasticsearch.index.search.geo.GeoBoundingBoxFilter;
import java.io.IOException;

View File

@ -21,8 +21,6 @@ package org.elasticsearch.index.query.xcontent;
import org.apache.lucene.search.Filter;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.lucene.geo.GeoBoundingBoxFilter;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.AbstractIndexComponent;
@ -32,6 +30,8 @@ import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldDataType;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldMapper;
import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.index.search.geo.GeoBoundingBoxFilter;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.elasticsearch.index.settings.IndexSettings;
import java.io.IOException;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.index.query.xcontent;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.search.geo.GeoDistance;
import java.io.IOException;

View File

@ -21,9 +21,6 @@ package org.elasticsearch.index.query.xcontent;
import org.apache.lucene.search.Filter;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.lucene.geo.GeoDistanceFilter;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentParser;
@ -34,6 +31,9 @@ import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldDataType;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldMapper;
import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.index.search.geo.GeoDistanceFilter;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.elasticsearch.index.settings.IndexSettings;
import java.io.IOException;

View File

@ -20,9 +20,9 @@
package org.elasticsearch.index.query.xcontent;
import org.elasticsearch.common.collect.Lists;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.lucene.geo.GeoPolygonFilter;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.elasticsearch.index.search.geo.GeoPolygonFilter;
import java.io.IOException;
import java.util.List;

View File

@ -22,8 +22,6 @@ package org.elasticsearch.index.query.xcontent;
import org.apache.lucene.search.Filter;
import org.elasticsearch.common.collect.Lists;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.lucene.geo.GeoPolygonFilter;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.AbstractIndexComponent;
@ -33,6 +31,8 @@ import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldDataType;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldMapper;
import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.elasticsearch.index.search.geo.GeoPolygonFilter;
import org.elasticsearch.index.settings.IndexSettings;
import java.io.IOException;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.DocIdSet;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.elasticsearch.ElasticSearchIllegalArgumentException;
import org.elasticsearch.common.unit.DistanceUnit;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.FieldComparator;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.DocIdSet;

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.elasticsearch.common.trove.TIntIntHashMap;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.DocIdSet;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.elasticsearch.common.unit.DistanceUnit;

View File

@ -21,10 +21,10 @@ package org.elasticsearch.search.facets.geodistance;
import org.elasticsearch.common.collect.Lists;
import org.elasticsearch.common.collect.Maps;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.query.xcontent.XContentFilterBuilder;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.search.builder.SearchSourceBuilderException;
import org.elasticsearch.search.facets.AbstractFacetBuilder;

View File

@ -20,12 +20,12 @@
package org.elasticsearch.search.facets.geodistance;
import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.index.cache.field.data.FieldDataCache;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldData;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldDataType;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.search.facets.Facet;
import org.elasticsearch.search.facets.FacetPhaseExecutionException;
import org.elasticsearch.search.facets.support.AbstractFacetCollector;

View File

@ -20,12 +20,12 @@
package org.elasticsearch.search.facets.geodistance;
import org.elasticsearch.common.collect.Lists;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.thread.ThreadLocals;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldMapper;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.elasticsearch.search.facets.FacetPhaseExecutionException;
import org.elasticsearch.search.facets.collector.FacetCollector;
import org.elasticsearch.search.facets.collector.FacetCollectorParser;

View File

@ -20,9 +20,9 @@
package org.elasticsearch.search.facets.geodistance;
import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPoint;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.script.search.SearchScript;
import org.elasticsearch.search.internal.SearchContext;

View File

@ -20,12 +20,12 @@
package org.elasticsearch.search.facets.geodistance;
import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.index.field.data.FieldDataType;
import org.elasticsearch.index.field.data.NumericFieldData;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPoint;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.search.facets.Facet;
import org.elasticsearch.search.facets.FacetPhaseExecutionException;
import org.elasticsearch.search.internal.SearchContext;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.search.sort;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.search.geo.GeoDistance;
import java.io.IOException;

View File

@ -20,12 +20,12 @@
package org.elasticsearch.search.sort;
import org.apache.lucene.search.SortField;
import org.elasticsearch.common.lucene.geo.GeoDistance;
import org.elasticsearch.common.lucene.geo.GeoDistanceDataComparator;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.mapper.xcontent.geo.GeoPointFieldMapper;
import org.elasticsearch.index.search.geo.GeoDistance;
import org.elasticsearch.index.search.geo.GeoDistanceDataComparator;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.elasticsearch.search.internal.SearchContext;
/**

View File

@ -19,11 +19,11 @@
package org.elasticsearch.index.mapper.xcontent.geopoint;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.xcontent.MapperTests;
import org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.hamcrest.MatcherAssert;
import org.testng.annotations.Test;

View File

@ -19,11 +19,11 @@
package org.elasticsearch.index.mapper.xcontent.geopoint;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.xcontent.MapperTests;
import org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.hamcrest.MatcherAssert;
import org.testng.annotations.Test;

View File

@ -20,11 +20,11 @@
package org.elasticsearch.index.mapper.xcontent.geopoint;
import org.elasticsearch.common.Numbers;
import org.elasticsearch.common.lucene.geo.GeoHashUtils;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.xcontent.MapperTests;
import org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper;
import org.elasticsearch.index.search.geo.GeoHashUtils;
import org.testng.annotations.Test;
import static org.hamcrest.MatcherAssert.*;

View File

@ -26,9 +26,6 @@ import org.apache.lucene.util.NumericUtils;
import org.elasticsearch.cache.query.parser.QueryParserCacheModule;
import org.elasticsearch.common.inject.Injector;
import org.elasticsearch.common.inject.ModulesBuilder;
import org.elasticsearch.common.lucene.geo.GeoBoundingBoxFilter;
import org.elasticsearch.common.lucene.geo.GeoDistanceFilter;
import org.elasticsearch.common.lucene.geo.GeoPolygonFilter;
import org.elasticsearch.common.lucene.search.*;
import org.elasticsearch.common.lucene.search.function.BoostScoreFunction;
import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery;
@ -46,6 +43,9 @@ import org.elasticsearch.index.query.IndexQueryParser;
import org.elasticsearch.index.query.IndexQueryParserModule;
import org.elasticsearch.index.query.IndexQueryParserService;
import org.elasticsearch.index.query.ParsedQuery;
import org.elasticsearch.index.search.geo.GeoBoundingBoxFilter;
import org.elasticsearch.index.search.geo.GeoDistanceFilter;
import org.elasticsearch.index.search.geo.GeoPolygonFilter;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.index.similarity.SimilarityModule;
import org.elasticsearch.script.ScriptModule;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.common.lucene.geo;
package org.elasticsearch.index.search.geo;
import org.testng.annotations.Test;