Upgrade Lucene to 8.5.0-snapshot-b01d7cb (#52584)

Upgrading 7x to same Lucene 8.5 version used in master
This commit is contained in:
markharwood 2020-02-21 10:25:03 +00:00 committed by GitHub
parent 5a7db0c520
commit 96d603979b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 78 additions and 64 deletions

View File

@ -1,5 +1,5 @@
elasticsearch = 7.7.0
lucene = 8.5.0-snapshot-d62f6307658
lucene = 8.5.0-snapshot-b01d7cb
bundled_jdk_vendor = adoptopenjdk
bundled_jdk = 13.0.2+8

View File

@ -0,0 +1 @@
b3d969d1d63fe9500fe5308b1a0c60d84d7bfa92

View File

@ -1 +0,0 @@
81e4689ebebfc0d5bb7d18ac328a6c8864283fb6

View File

@ -77,7 +77,7 @@ public class ScaledFloatFieldMapperTests extends ESSingleNodeTestCase {
IndexableField[] fields = doc.rootDoc().getFields("field");
assertEquals(2, fields.length);
IndexableField pointField = fields[0];
assertEquals(1, pointField.fieldType().pointDataDimensionCount());
assertEquals(1, pointField.fieldType().pointDimensionCount());
assertFalse(pointField.fieldType().stored());
assertEquals(1230, pointField.numericValue().longValue());
IndexableField dvField = fields[1];
@ -151,7 +151,7 @@ public class ScaledFloatFieldMapperTests extends ESSingleNodeTestCase {
IndexableField[] fields = doc.rootDoc().getFields("field");
assertEquals(1, fields.length);
IndexableField pointField = fields[0];
assertEquals(1, pointField.fieldType().pointDataDimensionCount());
assertEquals(1, pointField.fieldType().pointDimensionCount());
assertEquals(1230, pointField.numericValue().longValue());
}
@ -175,7 +175,7 @@ public class ScaledFloatFieldMapperTests extends ESSingleNodeTestCase {
IndexableField[] fields = doc.rootDoc().getFields("field");
assertEquals(3, fields.length);
IndexableField pointField = fields[0];
assertEquals(1, pointField.fieldType().pointDataDimensionCount());
assertEquals(1, pointField.fieldType().pointDimensionCount());
assertEquals(1230, pointField.numericValue().doubleValue(), 0d);
IndexableField dvField = fields[1];
assertEquals(DocValuesType.SORTED_NUMERIC, dvField.fieldType().docValuesType());
@ -204,7 +204,7 @@ public class ScaledFloatFieldMapperTests extends ESSingleNodeTestCase {
IndexableField[] fields = doc.rootDoc().getFields("field");
assertEquals(2, fields.length);
IndexableField pointField = fields[0];
assertEquals(1, pointField.fieldType().pointDataDimensionCount());
assertEquals(1, pointField.fieldType().pointDimensionCount());
assertEquals(1230, pointField.numericValue().longValue());
IndexableField dvField = fields[1];
assertEquals(DocValuesType.SORTED_NUMERIC, dvField.fieldType().docValuesType());
@ -319,7 +319,7 @@ public class ScaledFloatFieldMapperTests extends ESSingleNodeTestCase {
IndexableField[] fields = doc.rootDoc().getFields("field");
assertEquals(2, fields.length);
IndexableField pointField = fields[0];
assertEquals(1, pointField.fieldType().pointDataDimensionCount());
assertEquals(1, pointField.fieldType().pointDimensionCount());
assertFalse(pointField.fieldType().stored());
assertEquals(25, pointField.numericValue().longValue());
IndexableField dvField = fields[1];

View File

@ -0,0 +1 @@
d81b8f0ecdc67ba74049e65702582fcb8b605cfd

View File

@ -1 +0,0 @@
66b51c3a54ac621a8bd94ce6a9de3bec9df9a39a

View File

@ -0,0 +1 @@
13e9fd71cb3992b148728fe4884b7a6d0e26ee78

View File

@ -1 +0,0 @@
143c7e186fd571704b6ca60d06ec77e4f9fac368

View File

@ -0,0 +1 @@
58638e06cd1221b1d4de01705882922936ad69c9

View File

@ -1 +0,0 @@
3b6b79e00b08d29bf5a85e1f99216a65695d9b6e

View File

@ -0,0 +1 @@
346c87ed2ef2c6af49a434c568635a50cce64f2e

View File

@ -1 +0,0 @@
590d65061876a9ca7f3ea531048c9856187526aa

View File

@ -0,0 +1 @@
82ab2570c88053439912c5de5ed81cbe4337e450

View File

@ -1 +0,0 @@
0cc3e11974dc58556094423d492b462a60d46dbc

View File

@ -0,0 +1 @@
ef0703ff5dc1b704ea3e58596b91e4b08c326d4c

View File

@ -1 +0,0 @@
941e7eb32b43709baf05bfd8fdf37cc89fa60afa

View File

@ -0,0 +1 @@
9cf8ce62436a3768e18c431cf3be43f5e2672b24

View File

@ -1 +0,0 @@
8df4618d73fa321f75daf43c7d4e976af95e5249

View File

@ -0,0 +1 @@
4d358d392a9825c1502499d0a649730208f03777

View File

@ -1 +0,0 @@
8e7e27a4361de0faffe9d75003b3ad27bd19cdc5

View File

@ -0,0 +1 @@
17a0b6597c5bbe6cc2fc6d46003cdf9bc937c593

View File

@ -1 +0,0 @@
d619ec79dad9218b38d1eb766344393f335808dc

View File

@ -0,0 +1 @@
9c54e267bfa2cd1ef904dc6e35b38bbedda4c4b1

View File

@ -1 +0,0 @@
bcb2c684915d642c9452298fc5a8ca96e6eb33d3

View File

@ -0,0 +1 @@
a14fb545a10fcead07fbb0d801fdebce88192211

View File

@ -1 +0,0 @@
c14f6ad5ac0bc2e56148bb221695cbf74d237070

View File

@ -0,0 +1 @@
25314c94f5cbcd8e360b74fb9980fc42e3641c94

View File

@ -1 +0,0 @@
f093650ac3ee0393b6498d4ac167d1177e7a07ec

View File

@ -0,0 +1 @@
efe41313b6733a0d2764052972c4e27a7ca7636f

View File

@ -1 +0,0 @@
88e2018c6a3bd340b60c4b9b9d20effa589cd1f3

View File

@ -0,0 +1 @@
f19fb11eb40f9d1bf77272de1cbd8c83e6463829

View File

@ -1 +0,0 @@
04d36b02d9d5329e15684483410c5dc8941190a3

View File

@ -0,0 +1 @@
4295e60e1079c32dc19d1b070db3e62e04f07232

View File

@ -1 +0,0 @@
6d489d4769a6f6044f968543f763c33ab50d9eb8

View File

@ -0,0 +1 @@
1555f90440c10250e084d36c27e0da0b760d0296

View File

@ -1 +0,0 @@
caf369c56e13ba576555ab06be6d846f184bdc7d

View File

@ -0,0 +1 @@
4fd374ffc3ec3c82d62d0811d78b044833a8dfa1

View File

@ -1 +0,0 @@
9fd37ee637c1fde869ed5730fba38a7920a33c30

View File

@ -0,0 +1 @@
9e47dbe97818dd6caccf03e2ead6282d5e86bd3c

View File

@ -1 +0,0 @@
7122730e99902ba5394366abccd14e70b64f501a

View File

@ -0,0 +1 @@
bb9fa551d6d0929d5fd37c524c8c284de3f6786e

View File

@ -1 +0,0 @@
d3a1d0a426571ad7c27118dde28053e0c269cd83

View File

@ -0,0 +1 @@
28c935b5eb84a85ac24432c8c630fa4b47f5fd54

View File

@ -1 +0,0 @@
c23c462831d13ae2b770acf232c83ce8627bbfdc

View File

@ -0,0 +1 @@
25089b0f516df58e95f345504607853e7ba0a35d

View File

@ -1 +0,0 @@
444656499dcfcacc85cb4f20e32868c9d6ffc61f

View File

@ -441,7 +441,7 @@ public abstract class MappedFieldType extends FieldType {
}
protected final void failIfNotIndexed() {
if (indexOptions() == IndexOptions.NONE && pointDataDimensionCount() == 0) {
if (indexOptions() == IndexOptions.NONE && pointDimensionCount() == 0) {
// we throw an IAE rather than an ISE so that it translates to a 4xx code rather than 5xx code on the http layer
throw new IllegalArgumentException("Cannot search on field [" + name() + "] since it is not indexed.");
}

View File

@ -114,9 +114,9 @@ final class RewriteCachingDirectoryReader extends DirectoryReader {
if (pointValues != null) { // might not be in this reader
byte[] minPackedValue = pointValues.getMinPackedValue();
byte[] maxPackedValue = pointValues.getMaxPackedValue();
int numDimensions = pointValues.getNumIndexDimensions();
int numIndexDimensions = pointValues.getNumIndexDimensions();
int bytesPerDimension = pointValues.getBytesPerDimension();
int numDataDimensions = pointValues.getNumDataDimensions();
int numDimensions = pointValues.getNumDimensions();
long size = pointValues.size();
int docCount = pointValues.getDocCount();
valuesMap.put(info.name, new PointValues() {
@ -141,13 +141,13 @@ final class RewriteCachingDirectoryReader extends DirectoryReader {
}
@Override
public int getNumDataDimensions() {
return numDataDimensions;
public int getNumDimensions() {
return numDimensions;
}
@Override
public int getNumIndexDimensions() {
return numDimensions;
return numIndexDimensions;
}
@Override

View File

@ -58,14 +58,14 @@ public class XShapeTestUtil {
private static XYPolygon trianglePolygon(XYRectangle box) {
final float[] polyX = new float[4];
final float[] polyY = new float[4];
polyX[0] = (float)box.minX;
polyY[0] = (float)box.minY;
polyX[1] = (float)box.minX;
polyY[1] = (float)box.minY;
polyX[2] = (float)box.minX;
polyY[2] = (float)box.minY;
polyX[3] = (float)box.minX;
polyY[3] = (float)box.minY;
polyX[0] = box.minX;
polyY[0] = box.minY;
polyX[1] = box.minX;
polyY[1] = box.minY;
polyX[2] = box.minX;
polyY[2] = box.minY;
polyX[3] = box.minX;
polyY[3] = box.minY;
return new XYPolygon(polyX, polyY);
}
@ -75,26 +75,26 @@ public class XShapeTestUtil {
private static XYRectangle nextBoxInternal() {
// prevent lines instead of boxes
double x0 = nextDouble();
double x1 = nextDouble();
float x0 = nextFloat();
float x1 = nextFloat();
while (x0 == x1) {
x1 = nextDouble();
x1 = nextFloat();
}
// prevent lines instead of boxes
double y0 = nextDouble();
double y1 = nextDouble();
float y0 = nextFloat();
float y1 = nextFloat();
while (y0 == y1) {
y1 = nextDouble();
y1 = nextFloat();
}
if (x1 < x0) {
double x = x0;
float x = x0;
x0 = x1;
x1 = x;
}
if (y1 < y0) {
double y = y0;
float y = y0;
y0 = y1;
y1 = y;
}
@ -105,16 +105,16 @@ public class XShapeTestUtil {
private static XYPolygon boxPolygon(XYRectangle box) {
final float[] polyX = new float[5];
final float[] polyY = new float[5];
polyX[0] = (float)box.minX;
polyY[0] = (float)box.minY;
polyX[1] = (float)box.minX;
polyY[1] = (float)box.minY;
polyX[2] = (float)box.minX;
polyY[2] = (float)box.minY;
polyX[3] = (float)box.minX;
polyY[3] = (float)box.minY;
polyX[4] = (float)box.minX;
polyY[4] = (float)box.minY;
polyX[0] = box.minX;
polyY[0] = box.minY;
polyX[1] = box.minX;
polyY[1] = box.minY;
polyX[2] = box.minX;
polyY[2] = box.minY;
polyX[3] = box.minX;
polyY[3] = box.minY;
polyX[4] = box.minX;
polyY[4] = box.minY;
return new XYPolygon(polyX, polyY);
}
@ -201,6 +201,10 @@ public class XShapeTestUtil {
return BiasedNumbers.randomDoubleBetween(random(), -Float.MAX_VALUE, Float.MAX_VALUE);
}
public static float nextFloat() {
return BiasedNumbers.randomFloatBetween(random(), -Float.MAX_VALUE, Float.MAX_VALUE);
}
/** Keep it simple, we don't need to take arbitrary Random for geo tests */
private static Random random() {
return RandomizedContext.current().getRandom();

View File

@ -72,12 +72,22 @@ public class ShapeTestUtils {
List<LinearRing> holes = new ArrayList<>();
for (int i = 0; i < lucenePolygon.numHoles(); i++) {
XYPolygon poly = luceneHoles[i];
holes.add(linearRing(poly.getPolyX(), poly.getPolyY(), hasAlt));
holes.add(linearRing(floatsToDoubles(poly.getPolyX()), floatsToDoubles(poly.getPolyY()), hasAlt));
}
return new Polygon(linearRing(lucenePolygon.getPolyX(), lucenePolygon.getPolyY(), hasAlt), holes);
return new Polygon(linearRing(floatsToDoubles(lucenePolygon.getPolyX()), floatsToDoubles(lucenePolygon.getPolyY()), hasAlt),
holes);
}
return new Polygon(linearRing(lucenePolygon.getPolyX(), lucenePolygon.getPolyY(), hasAlt));
return new Polygon(linearRing(floatsToDoubles(lucenePolygon.getPolyX()), floatsToDoubles(lucenePolygon.getPolyY()), hasAlt));
}
static double[] floatsToDoubles(float[] f) {
double[] d = new double[f.length];
for (int i = 0; i < f.length; i++) {
d[i] = f[i];
}
return d;
}
public static Rectangle randomRectangle() {
org.apache.lucene.geo.XYRectangle rectangle = XShapeTestUtil.nextBox();

View File

@ -0,0 +1 @@
9c54e267bfa2cd1ef904dc6e35b38bbedda4c4b1

View File

@ -1 +0,0 @@
bcb2c684915d642c9452298fc5a8ca96e6eb33d3