public abstract class BaseGeoPointTestCase extends LuceneTestCase
LuceneTestCase.AwaitsFix, LuceneTestCase.BadApple, LuceneTestCase.Monster, LuceneTestCase.Nightly, LuceneTestCase.Slow, LuceneTestCase.SuppressCodecs, LuceneTestCase.SuppressFileSystems, LuceneTestCase.SuppressFsync, LuceneTestCase.SuppressReproduceLine, LuceneTestCase.SuppressSysoutChecks, LuceneTestCase.SuppressTempFileChecks, LuceneTestCase.ThrowingRunnable, LuceneTestCase.Weekly| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
FIELD_NAME |
assertsAreEnabled, classRules, DEFAULT_LINE_DOCS_FILE, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, LEAVE_TEMPORARY, MAYBE_CACHE_POLICY, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_MONSTER, SYSPROP_NIGHTLY, SYSPROP_SLOW, SYSPROP_WEEKLY, TEST_ASSERTS_ENABLED, TEST_AWAITSFIX, TEST_BADAPPLES, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_MONSTER, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_SLOW, TEST_THROTTLING, TEST_WEEKLY, VERBOSE| Constructor and Description |
|---|
BaseGeoPointTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addPointToDoc(java.lang.String field,
Document doc,
double lat,
double lon) |
protected abstract Query |
newDistanceQuery(java.lang.String field,
double centerLat,
double centerLon,
double radiusMeters) |
protected abstract Query |
newPolygonQuery(java.lang.String field,
Polygon... polygon) |
protected abstract Query |
newRectQuery(java.lang.String field,
double minLat,
double maxLat,
double minLon,
double maxLon) |
protected Rectangle |
nextBox() |
protected double |
nextLatitude() |
protected double |
nextLongitude() |
protected Polygon |
nextPolygon() |
protected double |
quantizeLat(double lat)
Override this to quantize randomly generated lat, so the test won't fail due to quantization errors, which are 1) annoying to debug,
and 2) should never affect "real" usage terribly.
|
protected double |
quantizeLon(double lon)
Override this to quantize randomly generated lon, so the test won't fail due to quantization errors, which are 1) annoying to debug,
and 2) should never affect "real" usage terribly.
|
protected boolean |
supportsPolygons()
Whether this impl supports polygons.
|
void |
testAllLatEqual() |
void |
testAllLonEqual() |
void |
testBoxBasics()
Add a single point and search for it in a box
|
void |
testBoxInvalidCoordinates() |
void |
testBoxNull()
null field name not allowed
|
void |
testDistanceBasics()
test we can search for a point
|
void |
testDistanceIllegal()
distance query should not accept invalid lat/lon as origin
|
void |
testDistanceInf()
Inf distance queries are not allowed
|
void |
testDistanceNaN()
NaN distance queries are not allowed
|
void |
testDistanceNegative()
negative distance queries are not allowed
|
void |
testDistanceNull()
null field name not allowed
|
void |
testEquals() |
void |
testIndexExtremeValues()
Valid values that should not cause exception
|
void |
testIndexInfValues()
Inf: illegal
|
void |
testIndexNaNValues()
NaN: illegal
|
void |
testIndexOutOfRangeValues()
Invalid values
|
void |
testMultiPolygonBasics()
test we can search for a multi-polygon
|
void |
testMultiValued() |
void |
testPolygonBasics()
test we can search for a polygon
|
void |
testPolygonHole()
test we can search for a polygon with a hole (but still includes the doc)
|
void |
testPolygonHoleExcludes()
test we can search for a polygon with a hole (that excludes the doc)
|
void |
testPolygonNullField()
null field name not allowed
|
void |
testRandomBig() |
void |
testRandomDistance()
Run a few iterations with just 10 docs, hopefully easy to debug
|
void |
testRandomDistanceHuge()
Runs with thousands of docs
|
void |
testRandomMedium() |
void |
testRandomTiny() |
void |
testRectBoundariesAreInclusive() |
void |
testSamePointManyTimes() |
void |
testSmallSetDateline() |
void |
testSmallSetDistance() |
void |
testSmallSetDistanceDateline() |
void |
testSmallSetDistanceNotEmpty()
see https://issues.apache.org/jira/browse/LUCENE-6905
|
void |
testSmallSetHugeDistance()
Explicitly large
|
void |
testSmallSetMultiValued() |
void |
testSmallSetPoly() |
void |
testSmallSetPolyWholeMap() |
void |
testSmallSetRect() |
void |
testSmallSetTinyDistance() |
void |
testSmallSetWholeMap() |
protected void |
verifyRandomDistances(double[] lats,
double[] lons) |
protected void |
verifyRandomPolygons(double[] lats,
double[] lons) |
protected void |
verifyRandomRectangles(double[] lats,
double[] lons) |
addVirusChecker, assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertFieldsEquals, assertFieldStatisticsEquals, assertNormsEquals, assertPointsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, assumeWorkingMMapOnWindows, atLeast, atLeast, closeAfterSuite, closeAfterTest, collate, createTempDir, createTempDir, createTempFile, createTempFile, dumpArray, dumpIterator, expectThrows, expectThrows, expectThrows, expectThrowsAnyOf, expectThrowsAnyOf, getBaseTempDirForTestClass, getDataInputStream, getDataPath, getOnlyLeafReader, getTestClass, getTestName, hasWorkingMMapOnWindows, isTestThread, localeForLanguageTag, maybeChangeLiveIndexWriterConfig, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newDirectory, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMaybeVirusCheckingDirectory, newMaybeVirusCheckingFSDirectory, newMergePolicy, newMergePolicy, newMergePolicy, newMockDirectory, newMockDirectory, newMockDirectory, newMockFSDirectory, newMockFSDirectory, newSearcher, newSearcher, newSearcher, newStringField, newStringField, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, overrideDefaultQueryCache, overrideTestDefaultQueryCache, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, resetDefaultQueryCache, restoreCPUCoreCount, restoreIndexWriterMaxDocs, restoreSpins, runWithRestrictedPermissions, setIndexWriterMaxDocs, setUp, setupCPUCoreCount, setupSpins, slowFileExists, tearDown, usually, usually, wrapReaderassertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertThrows, assertThrows, assertTrue, assertTrue, fail, failprotected static final java.lang.String FIELD_NAME
protected double nextLongitude()
protected double nextLatitude()
protected Rectangle nextBox()
protected Polygon nextPolygon()
protected boolean supportsPolygons()
public void testIndexExtremeValues()
public void testIndexOutOfRangeValues()
public void testIndexNaNValues()
public void testIndexInfValues()
public void testBoxBasics()
throws java.lang.Exception
java.lang.Exceptionpublic void testBoxNull()
public void testBoxInvalidCoordinates()
throws java.lang.Exception
java.lang.Exceptionpublic void testDistanceBasics()
throws java.lang.Exception
java.lang.Exceptionpublic void testDistanceNull()
public void testDistanceIllegal()
throws java.lang.Exception
java.lang.Exceptionpublic void testDistanceNegative()
public void testDistanceNaN()
public void testDistanceInf()
public void testPolygonBasics()
throws java.lang.Exception
java.lang.Exceptionpublic void testPolygonHole()
throws java.lang.Exception
java.lang.Exceptionpublic void testPolygonHoleExcludes()
throws java.lang.Exception
java.lang.Exceptionpublic void testMultiPolygonBasics()
throws java.lang.Exception
java.lang.Exceptionpublic void testPolygonNullField()
public void testSamePointManyTimes()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllLatEqual()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllLonEqual()
throws java.lang.Exception
java.lang.Exceptionpublic void testMultiValued()
throws java.lang.Exception
java.lang.Exceptionpublic void testRandomTiny()
throws java.lang.Exception
java.lang.Exceptionpublic void testRandomMedium()
throws java.lang.Exception
java.lang.Exception@LuceneTestCase.Nightly public void testRandomBig() throws java.lang.Exception
java.lang.Exceptionprotected double quantizeLat(double lat)
protected double quantizeLon(double lon)
protected abstract void addPointToDoc(java.lang.String field,
Document doc,
double lat,
double lon)
protected abstract Query newRectQuery(java.lang.String field, double minLat, double maxLat, double minLon, double maxLon)
protected abstract Query newDistanceQuery(java.lang.String field, double centerLat, double centerLon, double radiusMeters)
protected abstract Query newPolygonQuery(java.lang.String field, Polygon... polygon)
protected void verifyRandomRectangles(double[] lats,
double[] lons)
throws java.lang.Exception
java.lang.Exceptionprotected void verifyRandomDistances(double[] lats,
double[] lons)
throws java.lang.Exception
java.lang.Exceptionprotected void verifyRandomPolygons(double[] lats,
double[] lons)
throws java.lang.Exception
java.lang.Exceptionpublic void testRectBoundariesAreInclusive()
throws java.lang.Exception
java.lang.Exceptionpublic void testRandomDistance()
throws java.lang.Exception
java.lang.Exception@LuceneTestCase.Nightly public void testRandomDistanceHuge() throws java.lang.Exception
java.lang.Exceptionpublic void testEquals()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetRect()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetDateline()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetMultiValued()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetWholeMap()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetPoly()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetPolyWholeMap()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetDistance()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetTinyDistance()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetDistanceNotEmpty()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetHugeDistance()
throws java.lang.Exception
java.lang.Exceptionpublic void testSmallSetDistanceDateline()
throws java.lang.Exception
java.lang.ExceptionCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.