Upgrade to lucene-9.1.0-snapshot-1336263051c (#83667)

Lucene issues that resulted in elasticsearch changes:

LUCENE-9820 Separate logic for reading the BKD index from logic to intersecting it.
LUCENE-10377: Replace 'sortPos' with 'enableSkipping' in SortField.getComparator()
LUCENE-10301: make the test-framework a proper module by moving all test
classes to org.apache.lucene.tests
LUCENE-10300: rewrite how resources are read in ukrainian morfologik analyzer:
LUCENE-10054 Make HnswGraph hierarchical
This commit is contained in:
Mayya Sharipova 2022-02-22 09:53:20 +01:00 committed by GitHub
parent e853bf5f3f
commit 26c3dd6857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
454 changed files with 676 additions and 770 deletions

View file

@ -67,7 +67,7 @@ public class InternalPluginBuildPlugin implements InternalPlugin {
project.getTasks().withType(TestingConventionsTasks.class).named("testingConventions").configure(t -> { project.getTasks().withType(TestingConventionsTasks.class).named("testingConventions").configure(t -> {
t.getNaming().clear(); t.getNaming().clear();
t.getNaming() t.getNaming()
.create("Tests", testingConventionRule -> testingConventionRule.baseClass("org.apache.lucene.util.LuceneTestCase")); .create("Tests", testingConventionRule -> testingConventionRule.baseClass("org.apache.lucene.tests.util.LuceneTestCase"));
t.getNaming().create("IT", testingConventionRule -> { t.getNaming().create("IT", testingConventionRule -> {
testingConventionRule.baseClass("org.elasticsearch.test.ESIntegTestCase"); testingConventionRule.baseClass("org.elasticsearch.test.ESIntegTestCase");
testingConventionRule.baseClass("org.elasticsearch.test.rest.ESRestTestCase"); testingConventionRule.baseClass("org.elasticsearch.test.rest.ESRestTestCase");

View file

@ -21,7 +21,7 @@ public class TestingConventionsPrecommitPlugin extends PrecommitPlugin implement
.register("testingConventions", TestingConventionsTasks.class); .register("testingConventions", TestingConventionsTasks.class);
testingConventions.configure(t -> { testingConventions.configure(t -> {
TestingConventionRule testsRule = t.getNaming().maybeCreate("Tests"); TestingConventionRule testsRule = t.getNaming().maybeCreate("Tests");
testsRule.baseClass("org.apache.lucene.util.LuceneTestCase"); testsRule.baseClass("org.apache.lucene.tests.util.LuceneTestCase");
TestingConventionRule itRule = t.getNaming().maybeCreate("IT"); TestingConventionRule itRule = t.getNaming().maybeCreate("IT");
itRule.baseClass("org.elasticsearch.test.ESIntegTestCase"); itRule.baseClass("org.elasticsearch.test.ESIntegTestCase");
itRule.baseClass("org.elasticsearch.test.rest.ESRestTestCase"); itRule.baseClass("org.elasticsearch.test.rest.ESRestTestCase");

View file

@ -9,9 +9,9 @@ com.carrotsearch.randomizedtesting.annotations.Seed @ Don't commit hardcoded see
com.carrotsearch.randomizedtesting.annotations.Repeat @ Don't commit hardcoded repeats com.carrotsearch.randomizedtesting.annotations.Repeat @ Don't commit hardcoded repeats
org.apache.lucene.codecs.Codec#setDefault(org.apache.lucene.codecs.Codec) @ Use the SuppressCodecs("*") annotation instead org.apache.lucene.codecs.Codec#setDefault(org.apache.lucene.codecs.Codec) @ Use the SuppressCodecs("*") annotation instead
org.apache.lucene.util.LuceneTestCase$Slow @ Don't write slow tests org.apache.lucene.tests.util.LuceneTestCase$Slow @ Don't write slow tests
org.junit.Ignore @ Use AwaitsFix instead org.junit.Ignore @ Use AwaitsFix instead
org.apache.lucene.util.LuceneTestCase$Nightly @ We don't run nightly tests at this point! org.apache.lucene.tests.util.LuceneTestCase$Nightly @ We don't run nightly tests at this point!
com.carrotsearch.randomizedtesting.annotations.Nightly @ We don't run nightly tests at this point! com.carrotsearch.randomizedtesting.annotations.Nightly @ We don't run nightly tests at this point!
org.junit.Test @defaultMessage Just name your test method testFooBar org.junit.Test @defaultMessage Just name your test method testFooBar

View file

@ -1,5 +1,5 @@
elasticsearch = 8.2.0 elasticsearch = 8.2.0
lucene = 9.0.0 lucene = 9.1.0-snapshot-1336263051c
bundled_jdk_vendor = adoptium bundled_jdk_vendor = adoptium
bundled_jdk = 17.0.2+8 bundled_jdk = 17.0.2+8

View file

@ -10,7 +10,7 @@ package org.elasticsearch.geoip;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.MockTerminal;
import org.elasticsearch.xcontent.DeprecationHandler; import org.elasticsearch.xcontent.DeprecationHandler;
import org.elasticsearch.xcontent.NamedXContentRegistry; import org.elasticsearch.xcontent.NamedXContentRegistry;

View file

@ -11,7 +11,7 @@ package org.elasticsearch.cli.keystore;
import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Configuration;
import com.google.common.jimfs.Jimfs; import com.google.common.jimfs.Jimfs;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.cli.CommandTestCase; import org.elasticsearch.cli.CommandTestCase;
import org.elasticsearch.common.settings.KeyStoreWrapper; import org.elasticsearch.common.settings.KeyStoreWrapper;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;

View file

@ -12,7 +12,7 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.google.common.jimfs.Configuration; import com.google.common.jimfs.Configuration;
import com.google.common.jimfs.Jimfs; import com.google.common.jimfs.Jimfs;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.bouncycastle.bcpg.ArmoredOutputStream; import org.bouncycastle.bcpg.ArmoredOutputStream;
import org.bouncycastle.bcpg.BCPGOutputStream; import org.bouncycastle.bcpg.BCPGOutputStream;
import org.bouncycastle.bcpg.HashAlgorithmTags; import org.bouncycastle.bcpg.HashAlgorithmTags;

View file

@ -8,7 +8,7 @@
package org.elasticsearch.plugins.cli; package org.elasticsearch.plugins.cli;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.cli.ExitCodes;
import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.MockTerminal;

View file

@ -8,7 +8,7 @@
package org.elasticsearch.plugins.cli; package org.elasticsearch.plugins.cli;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.cli.ExitCodes;
import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.MockTerminal;

View file

@ -7,7 +7,7 @@
*/ */
package org.elasticsearch.plugins.cli; package org.elasticsearch.plugins.cli;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cli.MockTerminal; import org.elasticsearch.cli.MockTerminal;
import org.elasticsearch.cli.UserException; import org.elasticsearch.cli.UserException;

View file

@ -1,8 +1,8 @@
include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[] include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]
:lucene_version: 9.0.0 :lucene_version: 9.1.0
:lucene_version_path: 9_0_0 :lucene_version_path: 9_1_0
:jdk: 11.0.2 :jdk: 11.0.2
:jdk_major: 11 :jdk_major: 11
:build_flavor: default :build_flavor: default

View file

@ -14,8 +14,8 @@ import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.apache.lucene.tests.util.TimeUnits;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.TimeUnits;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.client.Request; import org.elasticsearch.client.Request;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;

View file

@ -18,8 +18,8 @@
package org.elasticsearch.core.internal.io; package org.elasticsearch.core.internal.io;
import org.apache.lucene.mockfile.FilterFileSystemProvider; import org.apache.lucene.tests.mockfile.FilterFileSystemProvider;
import org.apache.lucene.mockfile.FilterPath; import org.apache.lucene.tests.mockfile.FilterPath;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.elasticsearch.core.CheckedConsumer; import org.elasticsearch.core.CheckedConsumer;
import org.elasticsearch.core.PathUtils; import org.elasticsearch.core.PathUtils;

View file

@ -18,11 +18,11 @@
*/ */
package org.elasticsearch.h3; package org.elasticsearch.h3;
import org.apache.lucene.geo.GeoTestUtil;
import org.apache.lucene.spatial3d.geom.GeoPoint; import org.apache.lucene.spatial3d.geom.GeoPoint;
import org.apache.lucene.spatial3d.geom.GeoPolygon; import org.apache.lucene.spatial3d.geom.GeoPolygon;
import org.apache.lucene.spatial3d.geom.GeoPolygonFactory; import org.apache.lucene.spatial3d.geom.GeoPolygonFactory;
import org.apache.lucene.spatial3d.geom.PlanetModel; import org.apache.lucene.spatial3d.geom.PlanetModel;
import org.apache.lucene.tests.geo.GeoTestUtil;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -12,10 +12,10 @@ import org.apache.lucene.document.Field;
import org.apache.lucene.document.SortedNumericDocValuesField; import org.apache.lucene.document.SortedNumericDocValuesField;
import org.apache.lucene.document.StringField; import org.apache.lucene.document.StringField;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
import org.apache.lucene.util.NumericUtils; import org.apache.lucene.util.NumericUtils;
import org.elasticsearch.index.mapper.MappedFieldType; import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.NumberFieldMapper; import org.elasticsearch.index.mapper.NumberFieldMapper;

View file

@ -8,9 +8,9 @@
package org.elasticsearch.analysis.common; package org.elasticsearch.analysis.common;
import org.apache.lucene.analysis.CannedTokenStream;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.tests.analysis.CannedTokenStream;
import org.apache.lucene.tests.analysis.Token;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.IndexSettings;

View file

@ -8,11 +8,11 @@
package org.elasticsearch.analysis.common; package org.elasticsearch.analysis.common;
import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter; import org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter;
import org.apache.lucene.analysis.reverse.ReverseStringFilter; import org.apache.lucene.analysis.reverse.ReverseStringFilter;
import org.apache.lucene.tests.analysis.MockTokenizer;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;

View file

@ -8,8 +8,8 @@
package org.elasticsearch.analysis.common; package org.elasticsearch.analysis.common;
import org.apache.lucene.analysis.CannedTokenStream; import org.apache.lucene.tests.analysis.CannedTokenStream;
import org.apache.lucene.analysis.Token; import org.apache.lucene.tests.analysis.Token;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;
import org.elasticsearch.index.analysis.AnalysisTestsHelper; import org.elasticsearch.index.analysis.AnalysisTestsHelper;

View file

@ -9,10 +9,10 @@
package org.elasticsearch.analysis.common; package org.elasticsearch.analysis.common;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.KeywordTokenizer; import org.apache.lucene.analysis.core.KeywordTokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.tests.analysis.BaseTokenStreamTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;

View file

@ -9,10 +9,10 @@
package org.elasticsearch.analysis.common; package org.elasticsearch.analysis.common;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.tests.analysis.MockTokenizer;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;
import java.io.IOException; import java.io.IOException;

View file

@ -23,7 +23,7 @@ import java.io.IOException;
import java.io.Reader; import java.io.Reader;
import java.io.StringReader; import java.io.StringReader;
import static org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents; import static org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.assertTokenStreamContents;
public class WhitespaceTokenizerFactoryTests extends ESTestCase { public class WhitespaceTokenizerFactoryTests extends ESTestCase {

View file

@ -8,7 +8,7 @@
package org.elasticsearch.ingest.geoip; package org.elasticsearch.ingest.geoip;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.client.internal.Client; import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.service.ClusterService;

View file

@ -11,7 +11,7 @@ package org.elasticsearch.ingest.geoip;
import com.maxmind.db.InvalidDatabaseException; import com.maxmind.db.InvalidDatabaseException;
import org.apache.lucene.search.TotalHits; import org.apache.lucene.search.TotalHits;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;

View file

@ -1 +0,0 @@
0a3d818d6f6fb113831ed34553b24763fbda1e84

View file

@ -0,0 +1 @@
d7d416323284b166af4eb020987f4abdd9433344

View file

@ -1 +0,0 @@
91535ef6512c45c7e2b113b04cab7738ee774893

View file

@ -0,0 +1 @@
2bc7d3e319fd7d7e4f43ab1f559a0efc4881545d

View file

@ -7,7 +7,7 @@
*/ */
package org.elasticsearch.legacygeo; package org.elasticsearch.legacygeo;
import org.apache.lucene.geo.GeoTestUtil; import org.apache.lucene.tests.geo.GeoTestUtil;
import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.Version; import org.elasticsearch.Version;

View file

@ -8,13 +8,13 @@
package org.elasticsearch.index.mapper.extras; package org.elasticsearch.index.mapper.extras;
import org.apache.lucene.analysis.CannedTokenStream;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.IndexOptions; import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField; import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.IndexableFieldType; import org.apache.lucene.index.IndexableFieldType;
import org.apache.lucene.tests.analysis.CannedTokenStream;
import org.apache.lucene.tests.analysis.Token;
import org.elasticsearch.common.Strings; import org.elasticsearch.common.Strings;
import org.elasticsearch.index.mapper.DocumentMapper; import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.KeywordFieldMapper; import org.elasticsearch.index.mapper.KeywordFieldMapper;

View file

@ -7,8 +7,6 @@
*/ */
package org.elasticsearch.index.mapper.extras; package org.elasticsearch.index.mapper.extras;
import org.apache.lucene.analysis.CannedTokenStream;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.queries.intervals.Intervals; import org.apache.lucene.queries.intervals.Intervals;
@ -23,6 +21,8 @@ import org.apache.lucene.search.RegexpQuery;
import org.apache.lucene.search.TermInSetQuery; import org.apache.lucene.search.TermInSetQuery;
import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TermRangeQuery; import org.apache.lucene.search.TermRangeQuery;
import org.apache.lucene.tests.analysis.CannedTokenStream;
import org.apache.lucene.tests.analysis.Token;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.lucene.BytesRefs; import org.elasticsearch.common.lucene.BytesRefs;

View file

@ -21,7 +21,6 @@ import org.apache.lucene.queries.spans.SpanQuery;
import org.apache.lucene.queries.spans.SpanTermQuery; import org.apache.lucene.queries.spans.SpanTermQuery;
import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.CheckHits;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchNoDocsQuery; import org.apache.lucene.search.MatchNoDocsQuery;
import org.apache.lucene.search.MultiPhraseQuery; import org.apache.lucene.search.MultiPhraseQuery;
@ -31,6 +30,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.TermQuery;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.search.CheckHits;
import org.elasticsearch.common.CheckedIntFunction; import org.elasticsearch.common.CheckedIntFunction;
import org.elasticsearch.common.lucene.Lucene; import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery; import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery;

View file

@ -9,12 +9,12 @@
package org.elasticsearch.index.mapper.extras; package org.elasticsearch.index.mapper.extras;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.CannedTokenStream;
import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.KeywordAnalyzer; import org.apache.lucene.analysis.core.KeywordAnalyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.tests.analysis.CannedTokenStream;
import org.apache.lucene.tests.analysis.MockTokenizer;
import org.apache.lucene.tests.analysis.Token;
import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AnalyzerScope; import org.elasticsearch.index.analysis.AnalyzerScope;
import org.elasticsearch.index.analysis.IndexAnalyzers; import org.elasticsearch.index.analysis.IndexAnalyzers;

View file

@ -14,12 +14,12 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
import org.apache.lucene.document.StringField; import org.apache.lucene.document.StringField;
import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermInSetQuery; import org.apache.lucene.search.TermInSetQuery;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader; import org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader;
import org.elasticsearch.core.Tuple; import org.elasticsearch.core.Tuple;

View file

@ -15,12 +15,12 @@ import org.apache.lucene.document.SortedSetDocValuesField;
import org.apache.lucene.document.StringField; import org.apache.lucene.document.StringField;
import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermInSetQuery; import org.apache.lucene.search.TermInSetQuery;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader; import org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader;
import org.elasticsearch.core.Tuple; import org.elasticsearch.core.Tuple;

View file

@ -12,7 +12,6 @@ import org.apache.lucene.document.Document;
import org.apache.lucene.document.NumericDocValuesField; import org.apache.lucene.document.NumericDocValuesField;
import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.index.memory.MemoryIndex; import org.apache.lucene.index.memory.MemoryIndex;
import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.MatchAllDocsQuery;
@ -22,6 +21,7 @@ import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TotalHits; import org.apache.lucene.search.TotalHits;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
import org.apache.lucene.util.FixedBitSet; import org.apache.lucene.util.FixedBitSet;
import org.elasticsearch.index.mapper.SeqNoFieldMapper; import org.elasticsearch.index.mapper.SeqNoFieldMapper;
import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHit;

View file

@ -103,7 +103,7 @@ import static java.util.Collections.newSetFromMap;
import static java.util.Collections.singleton; import static java.util.Collections.singleton;
import static java.util.Collections.singletonList; import static java.util.Collections.singletonList;
import static java.util.Collections.synchronizedSet; import static java.util.Collections.synchronizedSet;
import static org.apache.lucene.util.TestUtil.randomSimpleString; import static org.apache.lucene.tests.util.TestUtil.randomSimpleString;
import static org.elasticsearch.action.bulk.BackoffPolicy.constantBackoff; import static org.elasticsearch.action.bulk.BackoffPolicy.constantBackoff;
import static org.elasticsearch.core.TimeValue.timeValueMillis; import static org.elasticsearch.core.TimeValue.timeValueMillis;
import static org.elasticsearch.core.TimeValue.timeValueSeconds; import static org.elasticsearch.core.TimeValue.timeValueSeconds;

View file

@ -47,7 +47,7 @@ import java.util.function.Function;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import static java.util.Collections.emptyMap; import static java.util.Collections.emptyMap;
import static org.apache.lucene.util.TestUtil.randomSimpleString; import static org.apache.lucene.tests.util.TestUtil.randomSimpleString;
import static org.elasticsearch.core.TimeValue.timeValueSeconds; import static org.elasticsearch.core.TimeValue.timeValueSeconds;
import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.instanceOf;

View file

@ -34,7 +34,7 @@ import java.io.IOException;
import java.util.Collections; import java.util.Collections;
import java.util.Map; import java.util.Map;
import static org.apache.lucene.util.TestUtil.randomSimpleString; import static org.apache.lucene.tests.util.TestUtil.randomSimpleString;
import static org.elasticsearch.core.TimeValue.parseTimeValue; import static org.elasticsearch.core.TimeValue.parseTimeValue;
/** /**

View file

@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import static org.apache.lucene.util.TestUtil.randomSimpleString; import static org.apache.lucene.tests.util.TestUtil.randomSimpleString;
import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE;
import static org.hamcrest.Matchers.either; import static org.hamcrest.Matchers.either;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;

View file

@ -12,7 +12,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;

View file

@ -1 +0,0 @@
a23a2c1c9baad61b6fb5380f072e41534c275875

View file

@ -0,0 +1 @@
0a60981b470cb004c8a1fa6264d7714fa7ba6acb

View file

@ -9,7 +9,7 @@
package org.elasticsearch.plugin.analysis.icu; package org.elasticsearch.plugin.analysis.icu;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.tests.analysis.BaseTokenStreamTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;

View file

@ -24,7 +24,7 @@ import java.io.StringReader;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import static org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents; import static org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.assertTokenStreamContents;
public class IcuTokenizerFactoryTests extends ESTestCase { public class IcuTokenizerFactoryTests extends ESTestCase {

View file

@ -22,9 +22,9 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.tests.util.TimeUnits;
import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TimeUnits;
import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter; import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter;
import org.junit.BeforeClass; import org.junit.BeforeClass;

View file

@ -1 +0,0 @@
55f00abe01e51181d687c6bbceca8544f319b97d

View file

@ -0,0 +1 @@
be1ff8e03e20d89f0d086db15a0478d9b5722972

View file

@ -36,7 +36,7 @@ import java.io.StringReader;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import static org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents; import static org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.assertTokenStreamContents;
import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThan;

View file

@ -1 +0,0 @@
c5258e674ad9c189338b026710869c2955d8e11d

View file

@ -0,0 +1 @@
fb2cc60f82827d83b59dca218f97cdc746de1ffe

View file

@ -1 +0,0 @@
437960fac10a9f8327fbd87be4e408eb140988b3

View file

@ -0,0 +1 @@
23dcc8fdfeddd13411e470c0af643b45a2ef71c4

View file

@ -8,10 +8,10 @@
package org.elasticsearch.plugin.analysis.phonetic; package org.elasticsearch.plugin.analysis.phonetic;
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.WhitespaceTokenizer; import org.apache.lucene.analysis.core.WhitespaceTokenizer;
import org.apache.lucene.analysis.phonetic.DaitchMokotoffSoundexFilter; import org.apache.lucene.analysis.phonetic.DaitchMokotoffSoundexFilter;
import org.apache.lucene.tests.analysis.BaseTokenStreamTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;

View file

@ -1 +0,0 @@
fe96c0b4609be5f7450773c2d7f099c51f4b1f7a

View file

@ -0,0 +1 @@
be6517c82fb00699991363a785f1b63650493a01

View file

@ -1 +0,0 @@
b92e86dd451d225e68ee4abac5b00bf883b6ea00

View file

@ -0,0 +1 @@
6a73d215b184c7b05d2cef06d342166bc4436414

View file

@ -9,9 +9,9 @@
package org.elasticsearch.index.analysis; package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.tests.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.tests.analysis.MockTokenizer;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.UUIDs; import org.elasticsearch.common.UUIDs;

View file

@ -1 +0,0 @@
048fddf601c6de7dd296f6da3f394544618f7cea

View file

@ -0,0 +1 @@
8d880b5ec86f40c9c8c23bc3c07ee1ae17f74354

View file

@ -16,20 +16,20 @@ import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AbstractIndexAnalyzerProvider; import org.elasticsearch.index.analysis.AbstractIndexAnalyzerProvider;
import org.elasticsearch.index.analysis.Analysis; import org.elasticsearch.index.analysis.Analysis;
public class UkrainianAnalyzerProvider extends AbstractIndexAnalyzerProvider<XUkrainianMorfologikAnalyzer> { public class UkrainianAnalyzerProvider extends AbstractIndexAnalyzerProvider<UkrainianMorfologikAnalyzer> {
private final XUkrainianMorfologikAnalyzer analyzer; private final UkrainianMorfologikAnalyzer analyzer;
public UkrainianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) { public UkrainianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
super(indexSettings, name, settings); super(indexSettings, name, settings);
analyzer = new XUkrainianMorfologikAnalyzer( analyzer = new UkrainianMorfologikAnalyzer(
Analysis.parseStopWords(env, settings, UkrainianMorfologikAnalyzer.getDefaultStopSet()), Analysis.parseStopWords(env, settings, UkrainianMorfologikAnalyzer.getDefaultStopwords()),
Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET) Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
); );
} }
@Override @Override
public XUkrainianMorfologikAnalyzer get() { public UkrainianMorfologikAnalyzer get() {
return this.analyzer; return this.analyzer;
} }

View file

@ -1,161 +0,0 @@
/*
* @notice
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.elasticsearch.plugin.analysis.ukrainian;
import morfologik.stemming.Dictionary;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.CharArraySet;
import org.apache.lucene.analysis.LowerCaseFilter;
import org.apache.lucene.analysis.StopFilter;
import org.apache.lucene.analysis.StopwordAnalyzerBase;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.WordlistLoader;
import org.apache.lucene.analysis.charfilter.MappingCharFilter;
import org.apache.lucene.analysis.charfilter.NormalizeCharMap;
import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
import org.apache.lucene.analysis.morfologik.MorfologikFilter;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.apache.lucene.analysis.uk.UkrainianMorfologikAnalyzer;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.core.SuppressForbidden;
import java.io.IOException;
import java.io.Reader;
import java.nio.charset.StandardCharsets;
/**
* A dictionary-based {@link Analyzer} for Ukrainian.
*
* Modified from lucene 8.8.0 sources to incorporate a bugfix for
* https://issues.apache.org/jira/browse/LUCENE-9930
*/
public final class XUkrainianMorfologikAnalyzer extends StopwordAnalyzerBase {
private final CharArraySet stemExclusionSet;
/** File containing default Ukrainian stopwords. */
public static final String DEFAULT_STOPWORD_FILE = "stopwords.txt";
/**
* Returns an unmodifiable instance of the default stop words set.
* @return default stop words set.
*/
public static CharArraySet getDefaultStopSet() {
return DefaultSetHolder.DEFAULT_STOP_SET;
}
/**
* Atomically loads the DEFAULT_STOP_SET and DICTIONARY in a lazy fashion once the outer class
* accesses the static final set the first time.;
*/
@SuppressForbidden(reason = "Lucene uses IOUtils")
private static class DefaultSetHolder {
static final CharArraySet DEFAULT_STOP_SET;
static final Dictionary DICTIONARY;
static {
try {
DEFAULT_STOP_SET = WordlistLoader.getSnowballWordSet(
IOUtils.getDecodingReader(UkrainianMorfologikAnalyzer.class, DEFAULT_STOPWORD_FILE, StandardCharsets.UTF_8)
);
DICTIONARY = Dictionary.read(UkrainianMorfologikAnalyzer.class.getClassLoader().getResource("ua/net/nlp/ukrainian.dict"));
} catch (IOException ex) {
// default set should always be present as it is part of the
// distribution (JAR)
throw new RuntimeException("Unable to load resources", ex);
}
}
}
/**
* Builds an analyzer with the default stop words: {@link #DEFAULT_STOPWORD_FILE}.
*/
public XUkrainianMorfologikAnalyzer() {
this(DefaultSetHolder.DEFAULT_STOP_SET);
}
/**
* Builds an analyzer with the given stop words.
*
* @param stopwords a stopword set
*/
public XUkrainianMorfologikAnalyzer(CharArraySet stopwords) {
this(stopwords, CharArraySet.EMPTY_SET);
}
/**
* Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
* provided this analyzer will add a {@link SetKeywordMarkerFilter} before
* stemming.
*
* @param stopwords a stopword set
* @param stemExclusionSet a set of terms not to be stemmed
*/
public XUkrainianMorfologikAnalyzer(CharArraySet stopwords, CharArraySet stemExclusionSet) {
super(stopwords);
this.stemExclusionSet = CharArraySet.unmodifiableSet(CharArraySet.copy(stemExclusionSet));
}
@Override
protected Reader initReader(String fieldName, Reader reader) {
NormalizeCharMap.Builder builder = new NormalizeCharMap.Builder();
// different apostrophes
builder.add("\u2019", "'");
builder.add("\u2018", "'");
builder.add("\u02BC", "'");
builder.add("`", "'");
builder.add("´", "'");
// ignored characters
builder.add("\u0301", "");
builder.add("\u00AD", "");
builder.add("ґ", "г");
builder.add("Ґ", "Г");
NormalizeCharMap normMap = builder.build();
reader = new MappingCharFilter(normMap, reader);
return reader;
}
/**
* Creates a
* {@link org.apache.lucene.analysis.Analyzer.TokenStreamComponents}
* which tokenizes all the text in the provided {@link Reader}.
*
* @return A
* {@link org.apache.lucene.analysis.Analyzer.TokenStreamComponents}
* built from an {@link StandardTokenizer} filtered with
* {@link LowerCaseFilter}, {@link StopFilter}
* , {@link SetKeywordMarkerFilter} if a stem exclusion set is
* provided and {@link MorfologikFilter} on the Ukrainian dictionary.
*/
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer source = new StandardTokenizer();
TokenStream result = new LowerCaseFilter(source);
result = new StopFilter(result, stopwords);
if (stemExclusionSet.isEmpty() == false) {
result = new SetKeywordMarkerFilter(result, stemExclusionSet);
}
result = new MorfologikFilter(result, DefaultSetHolder.DICTIONARY);
return new TokenStreamComponents(source, result);
}
}

View file

@ -9,6 +9,7 @@
package org.elasticsearch.plugin.analysis.ukrainian; package org.elasticsearch.plugin.analysis.ukrainian;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.uk.UkrainianMorfologikAnalyzer;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;
@ -24,6 +25,6 @@ public class UkrainianAnalysisTests extends ESTestCase {
final TestAnalysis analysis = createTestAnalysis(new Index("test", "_na_"), Settings.EMPTY, new AnalysisUkrainianPlugin()); final TestAnalysis analysis = createTestAnalysis(new Index("test", "_na_"), Settings.EMPTY, new AnalysisUkrainianPlugin());
Analyzer analyzer = analysis.indexAnalyzers.get("ukrainian").analyzer(); Analyzer analyzer = analysis.indexAnalyzers.get("ukrainian").analyzer();
MatcherAssert.assertThat(analyzer, instanceOf(XUkrainianMorfologikAnalyzer.class)); MatcherAssert.assertThat(analyzer, instanceOf(UkrainianMorfologikAnalyzer.class));
} }
} }

View file

@ -8,8 +8,8 @@
package org.elasticsearch.ingest.attachment; package org.elasticsearch.ingest.attachment;
import org.apache.lucene.util.LuceneTestCase.SuppressFileSystems; import org.apache.lucene.tests.util.LuceneTestCase.SuppressFileSystems;
import org.apache.lucene.util.TestUtil; import org.apache.lucene.tests.util.TestUtil;
import org.apache.tika.metadata.Metadata; import org.apache.tika.metadata.Metadata;
import org.elasticsearch.core.PathUtils; import org.elasticsearch.core.PathUtils;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;

View file

@ -17,7 +17,6 @@ import org.apache.lucene.document.TextField;
import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexOptions; import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.MatchAllDocsQuery;
@ -31,6 +30,7 @@ import org.apache.lucene.search.uhighlight.CustomSeparatorBreakIterator;
import org.apache.lucene.search.uhighlight.SplittingBreakIterator; import org.apache.lucene.search.uhighlight.SplittingBreakIterator;
import org.apache.lucene.search.uhighlight.UnifiedHighlighter; import org.apache.lucene.search.uhighlight.UnifiedHighlighter;
import org.apache.lucene.store.Directory; import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
import org.elasticsearch.common.Strings; import org.elasticsearch.common.Strings;
import org.elasticsearch.index.mapper.annotatedtext.AnnotatedTextFieldMapper.AnnotatedHighlighterAnalyzer; import org.elasticsearch.index.mapper.annotatedtext.AnnotatedTextFieldMapper.AnnotatedHighlighterAnalyzer;
import org.elasticsearch.index.mapper.annotatedtext.AnnotatedTextFieldMapper.AnnotatedText; import org.elasticsearch.index.mapper.annotatedtext.AnnotatedTextFieldMapper.AnnotatedText;

View file

@ -13,7 +13,7 @@ import org.apache.hadoop.fs.DelegateToFileSystem;
import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.fs.RawLocalFileSystem;
import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.tests.util.LuceneTestCase;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;

View file

@ -10,7 +10,7 @@ package org.elasticsearch.cli;
import joptsimple.OptionSet; import joptsimple.OptionSet;
import org.apache.lucene.util.TestRuleRestoreSystemProperties; import org.apache.lucene.tests.util.TestRuleRestoreSystemProperties;
import org.elasticsearch.common.cli.EnvironmentAwareCommand; import org.elasticsearch.common.cli.EnvironmentAwareCommand;
import org.elasticsearch.core.SuppressForbidden; import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;

View file

@ -8,8 +8,8 @@
package org.elasticsearch.common.settings; package org.elasticsearch.common.settings;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.cli.ExitCodes; import org.elasticsearch.cli.ExitCodes;
import org.elasticsearch.cli.UserException; import org.elasticsearch.cli.UserException;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;

View file

@ -11,7 +11,7 @@ package org.elasticsearch.backwards;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;

View file

@ -12,7 +12,7 @@ import com.carrotsearch.randomizedtesting.RandomizedContext;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.search.join.ScoreMode; import org.apache.lucene.search.join.ScoreMode;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.LatchedActionListener; import org.elasticsearch.action.LatchedActionListener;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest; import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;

View file

@ -12,7 +12,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;

View file

@ -8,8 +8,8 @@
package org.elasticsearch.bootstrap; package org.elasticsearch.bootstrap;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;

View file

@ -11,7 +11,7 @@ package org.elasticsearch.upgrades;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.rest.ESRestTestCase; import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;

View file

@ -12,7 +12,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;

View file

@ -12,7 +12,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.lucene.util.TimeUnits; import org.apache.lucene.tests.util.TimeUnits;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;

View file

@ -87,7 +87,7 @@ tasks.named("testingConventions").configure {
naming.clear() naming.clear()
naming { naming {
Tests { Tests {
baseClass "org.apache.lucene.util.LuceneTestCase" baseClass "org.apache.lucene.tests.util.LuceneTestCase"
} }
IT { IT {
baseClass "org.elasticsearch.test.ESIntegTestCase" baseClass "org.elasticsearch.test.ESIntegTestCase"

View file

@ -1 +0,0 @@
f78890829c3d6f15de48fdbc2c77ef4c0e3f005c

View file

@ -0,0 +1 @@
185d5cf3bbe7af1bf3b6577f69d4648b7f21fb08

View file

@ -1 +0,0 @@
9fb48d0244799e18299449ee62459caab0728490

View file

@ -0,0 +1 @@
dd944abcbf701063d823d71f8acb42070c70369f

View file

@ -1 +0,0 @@
be679fd274f264e4e8b02bc032d2788cd4076ab4

View file

@ -0,0 +1 @@
b40ede13eebf417f2ffb07a1b1594eab92d7df97

View file

@ -1 +0,0 @@
27ebe235d427b4e392fabab9b6bfa09524ca7f8b

View file

@ -0,0 +1 @@
65e470be45afb0109a9b128516c115fb52340035

View file

@ -1 +0,0 @@
a3cb395c2e8c672e6eec951b2b02371a4a883f73

View file

@ -0,0 +1 @@
34cae1ec8b65df516176c9086bbb893ae7706be8

View file

@ -1 +0,0 @@
94a855b5d09a6601289aeaeba0f11d5539552590

View file

@ -0,0 +1 @@
3dc91793e4a0eca6c5073e5c12c6cf45e7dea5ff

View file

@ -1 +0,0 @@
2371c95031422bc1f501d43ffcc7311baed4b35b

View file

@ -0,0 +1 @@
141bc2714d21b4c986ef49b379cb7771051be425

View file

@ -1 +0,0 @@
25c6170f4fa2f707908dfb92fbafc76727f901e0

View file

@ -0,0 +1 @@
e3253aee779b7e3c7e55efad2a91cd3d6902a6b3

View file

@ -1 +0,0 @@
87b4c7833d30895baf7091f9cb0db878e970b604

View file

@ -0,0 +1 @@
644df6a83310f5eb02bf8bf4069edf0f72fd8c32

View file

@ -1 +0,0 @@
bf13395ad2033bca3182fcbc83204e8ae1951945

View file

@ -0,0 +1 @@
593f6ca05697bce8d755ac32679a8a93b74b64cd

View file

@ -1 +0,0 @@
3c153a1dc1da3f98083cc932c9476df4b77b0ca5

View file

@ -0,0 +1 @@
59adf31a24a4b2f5c32be3946e77760ca068361a

View file

@ -1 +0,0 @@
6b4ee47f218ed3d123c1b07671677a2e4f3c133b

View file

@ -0,0 +1 @@
1b3ad2c10859f570df8d0fea7c79fdb66a82899a

Some files were not shown because too many files have changed in this diff Show more