Upgrade to lucene-7.3.0-snapshot-98a6b3d. (#29298)

Most notable changes include:
 - this release doesn't have the 7.2.1 version constant so I had to create one
 - spatial4j and jts were upgraded
This commit is contained in:
Adrien Grand 2018-04-03 09:27:14 +02:00 committed by GitHub
parent 782e41a67e
commit 3bdfc8f3fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
91 changed files with 164 additions and 282 deletions

View File

@ -95,7 +95,7 @@ public class PluginBuildPlugin extends BuildPlugin {
// we "upgrade" these optional deps to provided for plugins, since they will run
// with a full elasticsearch server that includes optional deps
compileOnly "org.locationtech.spatial4j:spatial4j:${project.versions.spatial4j}"
compileOnly "com.vividsolutions:jts:${project.versions.jts}"
compileOnly "org.locationtech.jts:jts-core:${project.versions.jts}"
compileOnly "org.apache.logging.log4j:log4j-api:${project.versions.log4j}"
compileOnly "org.apache.logging.log4j:log4j-core:${project.versions.log4j}"
compileOnly "org.elasticsearch:jna:${project.versions.jna}"

View File

@ -1,9 +1,9 @@
elasticsearch = 7.0.0-alpha1
lucene = 7.2.1
lucene = 7.3.0-snapshot-98a6b3d
# optional dependencies
spatial4j = 0.6
jts = 1.13
spatial4j = 0.7
jts = 1.15.0
jackson = 2.8.10
snakeyaml = 1.17
# when updating log4j, please update also docs/java-api/index.asciidoc

View File

@ -1,7 +1,7 @@
:version: 7.0.0-alpha1
:major-version: 7.x
:lucene_version: 7.2.1
:lucene_version_path: 7_2_1
:lucene_version: 7.3.0
:lucene_version_path: 7_3_0
:branch: master
:jdk: 1.8.0_131
:jdk_major: 8

View File

@ -12,13 +12,13 @@ to your classpath in order to use this type:
<dependency>
<groupId>org.locationtech.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
<version>0.6</version> <1>
<version>0.7</version> <1>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.13</version> <2>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.15.0</version> <2>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
@ -28,7 +28,7 @@ to your classpath in order to use this type:
</dependency>
-----------------------------------------------
<1> check for updates in http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.locationtech.spatial4j%22%20AND%20a%3A%22spatial4j%22[Maven Central]
<2> check for updates in http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.vividsolutions%22%20AND%20a%3A%22jts%22[Maven Central]
<2> check for updates in http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.locationtech.jts%22%20AND%20a%3A%22jts-core%22[Maven Central]
[source,java]
--------------------------------------------------

View File

@ -25,8 +25,9 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AbstractTokenFilterFactory;
import org.elasticsearch.index.analysis.MultiTermAwareComponent;
public class TrimTokenFilterFactory extends AbstractTokenFilterFactory {
public class TrimTokenFilterFactory extends AbstractTokenFilterFactory implements MultiTermAwareComponent {
private static final String UPDATE_OFFSETS_KEY = "update_offsets";
@ -41,4 +42,9 @@ public class TrimTokenFilterFactory extends AbstractTokenFilterFactory {
public TokenStream create(TokenStream tokenStream) {
return new TrimFilter(tokenStream);
}
@Override
public Object getMultiTermComponent() {
return this;
}
}

View File

@ -1 +0,0 @@
51fbb33cdb17bb36a0e86485685bba18eb1c2ccf

View File

@ -0,0 +1 @@
38ff5a1f4bcbfb6e1ffacd3263175c2a1ba23e9f

View File

@ -1 +0,0 @@
cfdfcd54c052cdd08140c7cd4daa7929b9657da0

View File

@ -0,0 +1 @@
ece1b4232697fad170c589f0df887efa6e66dd4f

View File

@ -1 +0,0 @@
21418892a16434ecb4f8efdbf4e62838f58a6a59

View File

@ -0,0 +1 @@
a16521e8f7240a9b93ea8ced157298b9d18bca43

View File

@ -1 +0,0 @@
970e860a6e252e7c1dc117c45176a847ce961ffc

View File

@ -0,0 +1 @@
0dc6db8e16bf1ed6ebaa914fcbfbb4970af23747

View File

@ -1 +0,0 @@
ec08375a8392720cc378995d8234cd6138a735f6

View File

@ -0,0 +1 @@
de43b057e8800f6c7b26907035664feb686127af

View File

@ -1 +0,0 @@
58305876f7fb0fbfad288910378cf4770da43892

View File

@ -0,0 +1 @@
c5e6a6d99a04ea5121bfd77470a7818725516ead

View File

@ -1 +0,0 @@
51cf40e2606863840e52d7e8981314a5a0323e06

View File

@ -0,0 +1 @@
d755dcef8763b783b7cbba7154a62f91e413007c

View File

@ -99,7 +99,7 @@ dependencies {
// lucene spatial
compile "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}", optional
compile "com.vividsolutions:jts:${versions.jts}", optional
compile "org.locationtech.jts:jts-core:${versions.jts}", optional
// logging
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
@ -281,6 +281,17 @@ thirdPartyAudit.excludes = [
// from org.locationtech.spatial4j.io.GeoJSONReader (spatial4j)
'org.noggit.JSONParser',
// from lucene-spatial
'com.fasterxml.jackson.databind.JsonSerializer',
'com.fasterxml.jackson.databind.JsonDeserializer',
'com.fasterxml.jackson.databind.node.ArrayNode',
'com.google.common.geometry.S2Cell',
'com.google.common.geometry.S2CellId',
'com.google.common.geometry.S2Projections',
'com.google.common.geometry.S2Point',
'com.google.common.geometry.S2$Metric',
'com.google.common.geometry.S2LatLng',
]
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {

View File

@ -1 +0,0 @@
3ccfb9b60f04d71add996a666ceb8902904fd805

View File

@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@ -0,0 +1 @@
705981b7e25d05a76a3654e597dab6ba423eb79e

View File

@ -0,0 +1,31 @@
Eclipse Distribution License - v 1.0
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of the Eclipse Foundation, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1 +0,0 @@
324c3a090a04136720f4ef612db03b5c14866efa

View File

@ -0,0 +1 @@
a731424734fd976b409f1963ba88471caccc18aa

View File

@ -1 +0,0 @@
bc8dc9cc1555543532953d1dff33b67f849e19f9

View File

@ -0,0 +1 @@
5f8ad8c3f8c404803aa81a43ac6f732e19c00935

View File

@ -1 +0,0 @@
91897dbbbbada95ccddbd90505f0a0ba6bf7c199

View File

@ -0,0 +1 @@
19b1a1fff6bb077e0660e4f0666807e24dd26865

View File

@ -1 +0,0 @@
5dbae570b1a4e54cd978fe5c3ed2d6b2f87be968

View File

@ -0,0 +1 @@
94dd26d685ae981905b775780e6c824f723b14af

View File

@ -1 +0,0 @@
2f4b8c93563409cfebb36d910c4dab4910678689

View File

@ -0,0 +1 @@
9783a0bb56fb8bbd17280d3def97a656999f6a88

View File

@ -1 +0,0 @@
3121a038d472f51087500dd6da9146a9b0031ae4

View File

@ -0,0 +1 @@
01eda74d798af85f846ebd74f53ec7a16e6e2ba1

View File

@ -1 +0,0 @@
21233b2baeed2aaa5acf8359bf8c4a90cc6bf553

View File

@ -0,0 +1 @@
29b8b6324722dc6dda784731e3e918de9715422c

View File

@ -1 +0,0 @@
0478fed6c474c95f6c0c678c04297a3df0c1687e

View File

@ -0,0 +1 @@
e1ae49522164a721d67459e59792db6f4dff70fc

View File

@ -1 +0,0 @@
02135cf5047409ed1ca6cd098e802b30f9dbd1ff

View File

@ -0,0 +1 @@
87595367717ddc9fbf95bbf649216a5d7954d9d7

View File

@ -1 +0,0 @@
a87d8b14d1c8045f61cb704955706f6681170be3

View File

@ -0,0 +1 @@
5befbb58ef76c79fc8afebbca781b01320b8ffad

View File

@ -1 +0,0 @@
dc8dd132fd183791dc27591a69974f55b685d0d7

View File

@ -0,0 +1 @@
3d7aa72ccec38ef902b149da36548fb227eeb58a

View File

@ -1 +0,0 @@
09c4d96e6ea34292f7cd20c4ff1d16ff31eb7869

View File

@ -0,0 +1 @@
ac1755a69f14c53f7846ef7d9b405d44caf53091

View File

@ -1 +0,0 @@
8aff7e8a5547c03d0c4e7e1b58cb30773bb1d7d5

View File

@ -0,0 +1 @@
9d2fa5db0ce9fb5a1b4e9f18d818b14e082ef5a0

View File

@ -1 +0,0 @@
8b0db8ff795b31994ebe93779c450d17c612590d

View File

@ -0,0 +1 @@
99aefdef8178e54f93b743452c5d36bf7e8b3a2d

View File

@ -1 +0,0 @@
1c3804602e35589c21b0391fa7088ef012751a22

View File

@ -0,0 +1 @@
6257a8a1860ec5f57439c420637d5f20bab124ae

View File

@ -1 +0,0 @@
21b15310bddcfd8c72611c180f20cf23279809a3

View File

@ -0,0 +1 @@
faa8ba85d503da4ab872d17ba8c00da0098ab2f2

View File

@ -151,21 +151,23 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_6_1_3 = new Version(V_6_1_3_ID, org.apache.lucene.util.Version.LUCENE_7_1_0);
public static final int V_6_1_4_ID = 6010499;
public static final Version V_6_1_4 = new Version(V_6_1_4_ID, org.apache.lucene.util.Version.LUCENE_7_1_0);
// The below version is missing from the 7.3 JAR
private static final org.apache.lucene.util.Version LUCENE_7_2_1 = org.apache.lucene.util.Version.fromBits(7, 2, 1);
public static final int V_6_2_0_ID = 6020099;
public static final Version V_6_2_0 = new Version(V_6_2_0_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
public static final Version V_6_2_0 = new Version(V_6_2_0_ID, LUCENE_7_2_1);
public static final int V_6_2_1_ID = 6020199;
public static final Version V_6_2_1 = new Version(V_6_2_1_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
public static final Version V_6_2_1 = new Version(V_6_2_1_ID, LUCENE_7_2_1);
public static final int V_6_2_2_ID = 6020299;
public static final Version V_6_2_2 = new Version(V_6_2_2_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
public static final Version V_6_2_2 = new Version(V_6_2_2_ID, LUCENE_7_2_1);
public static final int V_6_2_3_ID = 6020399;
public static final Version V_6_2_3 = new Version(V_6_2_3_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
public static final Version V_6_2_3 = new Version(V_6_2_3_ID, LUCENE_7_2_1);
public static final int V_6_2_4_ID = 6020499;
public static final Version V_6_2_4 = new Version(V_6_2_4_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
public static final Version V_6_2_4 = new Version(V_6_2_4_ID, LUCENE_7_2_1);
public static final int V_6_3_0_ID = 6030099;
public static final Version V_6_3_0 = new Version(V_6_3_0_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
public static final Version V_6_3_0 = new Version(V_6_3_0_ID, LUCENE_7_2_1);
public static final int V_7_0_0_alpha1_ID = 7000001;
public static final Version V_7_0_0_alpha1 =
new Version(V_7_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_7_2_1);
new Version(V_7_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_7_3_0);
public static final Version CURRENT = V_7_0_0_alpha1;
static {

View File

@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.geo;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.geo.builders.CircleBuilder;
import org.elasticsearch.common.geo.builders.CoordinatesBuilder;

View File

@ -36,7 +36,7 @@ public class ShapesAvailability {
boolean xJTS_AVAILABLE;
try {
Class.forName("com.vividsolutions.jts.geom.GeometryFactory");
Class.forName("org.locationtech.jts.geom.GeometryFactory");
xJTS_AVAILABLE = true;
} catch (ClassNotFoundException ignored) {
xJTS_AVAILABLE = false;

View File

@ -23,7 +23,7 @@ import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.ShapeParser;
import org.locationtech.spatial4j.shape.Circle;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.ElasticsearchException;
import java.util.ArrayList;

View File

@ -23,7 +23,7 @@ import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.GeoWKTParser;
import org.elasticsearch.common.geo.parsers.ShapeParser;
import org.locationtech.spatial4j.shape.Rectangle;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;

View File

@ -19,10 +19,10 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.LineString;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.LineString;
import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.ShapeParser;

View File

@ -22,9 +22,9 @@ package org.elasticsearch.common.geo.builders;
import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.GeoWKTParser;
import org.elasticsearch.common.geo.parsers.ShapeParser;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.LineString;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.LineString;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.XShapeCollection;

View File

@ -23,7 +23,7 @@ import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.ShapeParser;
import org.elasticsearch.common.geo.parsers.GeoWKTParser;
import org.locationtech.spatial4j.shape.Shape;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.geo.XShapeCollection;
import org.elasticsearch.common.io.stream.StreamInput;

View File

@ -22,7 +22,7 @@ package org.elasticsearch.common.geo.builders;
import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.ShapeParser;
import org.locationtech.spatial4j.shape.Point;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.xcontent.XContentBuilder;

View File

@ -19,12 +19,12 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.LinearRing;
import com.vividsolutions.jts.geom.MultiPolygon;
import com.vividsolutions.jts.geom.Polygon;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.LinearRing;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Polygon;
import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.geo.GeoShapeType;
import org.elasticsearch.common.geo.parsers.ShapeParser;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.Assertions;

View File

@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.geo.parsers;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.xcontent.ToXContentObject;
import org.elasticsearch.common.xcontent.XContentBuilder;

View File

@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.geo.parsers;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.Explicit;
import org.elasticsearch.common.geo.GeoPoint;

View File

@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.geo.parsers;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.common.geo.GeoShapeType;

View File

@ -43,7 +43,7 @@ public class CustomPassageFormatterTests extends ESTestCase {
int end = start + match.length();
passage1.setStartOffset(0);
passage1.setEndOffset(end + 2); //lets include the whitespace at the end to make sure we trim it
passage1.addMatch(start, end, matchBytesRef);
passage1.addMatch(start, end, matchBytesRef, 1);
passages[0] = passage1;
Passage passage2 = new Passage();
@ -51,7 +51,7 @@ public class CustomPassageFormatterTests extends ESTestCase {
end = start + match.length();
passage2.setStartOffset(passage1.getEndOffset());
passage2.setEndOffset(end + 26);
passage2.addMatch(start, end, matchBytesRef);
passage2.addMatch(start, end, matchBytesRef, 1);
passages[1] = passage2;
Passage passage3 = new Passage();
@ -84,7 +84,7 @@ public class CustomPassageFormatterTests extends ESTestCase {
int end = start + match.length();
passage1.setStartOffset(0);
passage1.setEndOffset(end + 6); //lets include the whitespace at the end to make sure we trim it
passage1.addMatch(start, end, matchBytesRef);
passage1.addMatch(start, end, matchBytesRef, 1);
passages[0] = passage1;
Passage passage2 = new Passage();
@ -92,7 +92,7 @@ public class CustomPassageFormatterTests extends ESTestCase {
end = start + match.length();
passage2.setStartOffset(passage1.getEndOffset());
passage2.setEndOffset(content.length());
passage2.addMatch(start, end, matchBytesRef);
passage2.addMatch(start, end, matchBytesRef, 1);
passages[1] = passage2;
Snippet[] fragments = passageFormatter.format(passages, content);

View File

@ -18,8 +18,8 @@
*/
package org.elasticsearch.common.geo;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.elasticsearch.common.geo.parsers.ShapeParser;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;

View File

@ -19,12 +19,12 @@
package org.elasticsearch.common.geo;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.LinearRing;
import com.vividsolutions.jts.geom.MultiLineString;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.geom.Polygon;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.LinearRing;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.Strings;

View File

@ -18,12 +18,12 @@
*/
package org.elasticsearch.common.geo;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.LinearRing;
import com.vividsolutions.jts.geom.MultiLineString;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.geom.Polygon;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.LinearRing;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.apache.lucene.geo.GeoTestUtil;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchParseException;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.common.geo;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.Polygon;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.Polygon;
import org.elasticsearch.common.geo.builders.CoordinatesBuilder;
import org.elasticsearch.common.geo.builders.CircleBuilder;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.unit.DistanceUnit;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.locationtech.spatial4j.shape.Rectangle;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.elasticsearch.test.geo.RandomShapeGenerator.ShapeType;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.elasticsearch.test.geo.RandomShapeGenerator.ShapeType;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.elasticsearch.test.geo.RandomShapeGenerator.ShapeType;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.elasticsearch.test.geo.RandomShapeGenerator.ShapeType;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.common.geo.builders;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.common.geo.builders.ShapeBuilder.Orientation;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.elasticsearch.test.geo.RandomShapeGenerator.ShapeType;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.index.query;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.apache.lucene.search.MatchNoDocsQuery;
import org.apache.lucene.search.Query;
import org.elasticsearch.common.ParsingException;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.index.query;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.ConstantScoreQuery;

View File

@ -29,7 +29,7 @@ import org.elasticsearch.common.geo.builders.ShapeBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentType;
import org.locationtech.spatial4j.shape.Rectangle;
import com.vividsolutions.jts.geom.Coordinate;
import org.locationtech.jts.geom.Coordinate;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.search.SearchResponse;

View File

@ -20,9 +20,9 @@
package org.elasticsearch.test.geo;
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
import com.vividsolutions.jts.algorithm.ConvexHull;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import org.locationtech.jts.algorithm.ConvexHull;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.geo.builders.CoordinatesBuilder;
import org.elasticsearch.common.geo.builders.GeometryCollectionBuilder;

View File

@ -26,13 +26,13 @@ import org.locationtech.spatial4j.shape.impl.GeoCircle;
import org.locationtech.spatial4j.shape.impl.RectangleImpl;
import org.locationtech.spatial4j.shape.jts.JtsGeometry;
import org.locationtech.spatial4j.shape.jts.JtsPoint;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.MultiLineString;
import com.vividsolutions.jts.geom.MultiPoint;
import com.vividsolutions.jts.geom.MultiPolygon;
import com.vividsolutions.jts.geom.Polygon;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.geom.MultiPoint;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Polygon;
import org.elasticsearch.common.geo.GeoDistance;
import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.common.unit.DistanceUnit;

View File

@ -216,6 +216,8 @@ public abstract class AnalysisFactoryTestCase extends ESTestCase {
.put("tokenoffsetpayload", Void.class)
// puts the type into the payload
.put("typeaspayload", Void.class)
// puts the type as a synonym
.put("typeassynonym", Void.class)
// fingerprint
.put("fingerprint", Void.class)
// for tee-sinks
@ -463,11 +465,6 @@ public abstract class AnalysisFactoryTestCase extends ESTestCase {
Set<Object> classesThatShouldNotHaveMultiTermSupport = new HashSet<>(actual);
classesThatShouldNotHaveMultiTermSupport.removeAll(expected);
classesThatShouldNotHaveMultiTermSupport.remove("token filter [trim]");
if (Version.CURRENT.luceneVersion.onOrAfter(org.apache.lucene.util.Version.fromBits(7, 3, 0))) {
// TODO: remove the above exclusion when we move to lucene 7.3
assert false;
}
assertTrue("Pre-built components should not have multi-term support: " + classesThatShouldNotHaveMultiTermSupport,
classesThatShouldNotHaveMultiTermSupport.isEmpty());
}