[Rename] server/src/test/java/org/elasticsearch/index (#393)

* Refactor module server/src/test/java/org/elasticsearch/index

Signed-off-by: Harold Wang <harowang@amazon.com>

* Update class resolution during refactor

Signed-off-by: Harold Wang <harowang@amazon.com>

* Restore unintended class path changes

Signed-off-by: Harold Wang <harowang@amazon.com>
This commit is contained in:
Harold Wang 2021-03-18 22:37:24 -07:00 committed by Nick Knize
parent d6cb553c7a
commit b97834ce99
317 changed files with 708 additions and 724 deletions

View File

@ -50,7 +50,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.elasticsearch.index.IndexSettingsTests.newIndexMeta;
import static org.opensearch.index.IndexSettingsTests.newIndexMeta;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardTokenizer;
@ -62,7 +62,7 @@ import org.opensearch.index.cache.query.IndexQueryCache;
import org.opensearch.index.cache.query.QueryCache;
import org.opensearch.index.engine.Engine;
import org.opensearch.index.engine.InternalEngineFactory;
import org.elasticsearch.index.engine.InternalEngineTests;
import org.opensearch.index.engine.InternalEngineTests;
import org.opensearch.index.fielddata.IndexFieldDataCache;
import org.opensearch.index.mapper.ParsedDocument;
import org.opensearch.index.mapper.Uid;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.TopDocs;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata;
@ -365,7 +365,7 @@ public class IndexSettingsTests extends OpenSearchTestCase {
settings = new IndexSettings(metadata, Settings.EMPTY);
assertEquals(IndexSettings.MAX_ADJACENCY_MATRIX_FILTERS_SETTING.get(Settings.EMPTY).intValue(),
settings.getMaxAdjacencyMatrixFilters());
assertWarnings("[index.max_adjacency_matrix_filters] setting was deprecated in Elasticsearch and will be removed in a "
assertWarnings("[index.max_adjacency_matrix_filters] setting was deprecated in OpenSearch and will be removed in a "
+ "future release! See the breaking changes documentation for the next major version.");
}

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.opensearch.common.settings.Settings;
import org.opensearch.search.MultiValueMode;
@ -25,7 +25,7 @@ import org.opensearch.search.sort.SortOrder;
import org.opensearch.test.OpenSearchTestCase;
import static org.opensearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
import static org.elasticsearch.index.IndexSettingsTests.newIndexMeta;
import static org.opensearch.index.IndexSettingsTests.newIndexMeta;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.opensearch.cluster.ClusterState;
import org.opensearch.common.UUIDs;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.opensearch.common.lease.Releasable;
import org.elasticsearch.common.settings.Settings;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import com.fasterxml.jackson.core.JsonParseException;
import org.apache.logging.log4j.LogManager;
@ -38,7 +38,7 @@ import org.opensearch.common.xcontent.XContentType;
import org.opensearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.IndexingSlowLog.IndexingSlowLogMessage;
import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.engine.InternalEngineTests;
import org.opensearch.index.engine.InternalEngineTests;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
import org.elasticsearch.index.mapper.Uid;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.apache.lucene.index.NoMergePolicy;
import org.opensearch.common.settings.Settings;
@ -28,7 +28,7 @@ import org.opensearch.test.OpenSearchTestCase;
import java.io.IOException;
import static org.opensearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
import static org.elasticsearch.index.IndexSettingsTests.newIndexMeta;
import static org.opensearch.index.IndexSettingsTests.newIndexMeta;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;
@ -32,7 +32,7 @@ import org.opensearch.common.settings.Settings;
import org.opensearch.test.OpenSearchTestCase;
import static org.opensearch.common.util.concurrent.OpenSearchExecutors.NODE_PROCESSORS_SETTING;
import static org.elasticsearch.index.IndexSettingsTests.newIndexMeta;
import static org.opensearch.index.IndexSettingsTests.newIndexMeta;
import static org.opensearch.index.MergeSchedulerConfig.MAX_MERGE_COUNT_SETTING;
import static org.opensearch.index.MergeSchedulerConfig.MAX_THREAD_COUNT_SETTING;
import static org.hamcrest.core.StringContains.containsString;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.apache.lucene.index.TieredMergePolicy;
import org.opensearch.test.OpenSearchTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -331,7 +331,7 @@ public class SearchSlowLogTests extends OpenSearchSingleNodeTestCase {
assertNotNull(ex.getCause());
assertThat(ex.getCause(), instanceOf(IllegalArgumentException.class));
final IllegalArgumentException cause = (IllegalArgumentException) ex.getCause();
assertThat(cause, hasToString(containsString("No enum constant org.elasticsearch.index.SlowLogLevel.NOT A LEVEL")));
assertThat(cause, hasToString(containsString("No enum constant org.opensearch.index.SlowLogLevel.NOT A LEVEL")));
}
assertEquals(SlowLogLevel.TRACE, log.getLevel());

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.opensearch.test.OpenSearchTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index;
package org.opensearch.index;
import org.opensearch.common.lucene.uid.Versions;
import org.opensearch.test.OpenSearchTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import com.carrotsearch.randomizedtesting.generators.RandomPicks;
import org.apache.lucene.analysis.Analyzer;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.CharArraySet;
import org.opensearch.common.settings.Settings;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.opensearch.indices.analysis.AnalysisFactoryTestCase;
import org.opensearch.plugins.AnalysisPlugin;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.MockLowerCaseFilter;
import org.apache.lucene.analysis.MockTokenizer;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.opensearch.common.settings.Settings;
import org.elasticsearch.env.Environment;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.core.KeywordAnalyzer;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.Analyzer;
import org.opensearch.Version;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.TokenFilter;
import org.opensearch.Version;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.LowerCaseFilter;
import org.apache.lucene.analysis.TokenStream;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope;
@ -30,7 +30,6 @@ import org.apache.lucene.analysis.miscellaneous.DisableGraphAttribute;
import org.elasticsearch.index.IndexSettings;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.test.OpenSearchTokenStreamTestCase;
import org.opensearch.index.analysis.AnalysisTestsHelper;
import java.io.IOException;
import java.io.StringReader;
@ -39,7 +38,7 @@ import static org.hamcrest.Matchers.instanceOf;
@ThreadLeakScope(Scope.NONE)
public class ShingleTokenFilterFactoryTests extends OpenSearchTokenStreamTestCase {
private static final String RESOURCE = "/org/elasticsearch/index/analysis/shingle_analysis.json";
private static final String RESOURCE = "/org/opensearch/index/analysis/shingle_analysis.json";
public void testDefault() throws IOException {
OpenSearchTestCase.TestAnalysis analysis = AnalysisTestsHelper.createTestAnalysisFromClassPath(createTempDir(), RESOURCE);
@ -110,7 +109,7 @@ public class ShingleTokenFilterFactoryTests extends OpenSearchTokenStreamTestCas
* is greater than the allowed value of max_shingle_diff
*/
public void testMaxShingleDiffException() throws Exception{
String RESOURCE2 = "/org/elasticsearch/index/analysis/shingle_analysis2.json";
String RESOURCE2 = "/org/opensearch/index/analysis/shingle_analysis2.json";
int maxAllowedShingleDiff = 3;
int shingleDiff = 8;
try {

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata;
@ -31,7 +31,7 @@ import static org.opensearch.test.OpenSearchTestCase.createTestAnalysis;
public class StopAnalyzerTests extends OpenSearchTokenStreamTestCase {
public void testDefaultsCompoundAnalysis() throws Exception {
String json = "/org/elasticsearch/index/analysis/stop.json";
String json = "/org/opensearch/index/analysis/stop.json";
Settings settings = Settings.builder()
.loadFromStream(json, getClass().getResourceAsStream(json), false)
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString())

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.analysis;
package org.opensearch.index.analysis;
import org.apache.lucene.analysis.StopFilter;
import org.apache.lucene.analysis.TokenStream;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.cache.bitset;
package org.opensearch.index.cache.bitset;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.codec;
package org.opensearch.index.codec;
import org.apache.logging.log4j.LogManager;
import org.apache.lucene.codecs.Codec;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import com.carrotsearch.hppc.LongArrayList;
import org.apache.lucene.index.IndexCommit;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.lucene87.Lucene87Codec;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.search.Query;
import org.opensearch.common.lucene.search.Queries;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.index.LiveIndexWriterConfig;
import org.opensearch.common.settings.Settings;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.shard.EngineAccess;
import org.opensearch.index.shard.EngineAccess;
import org.opensearch.test.OpenSearchSingleNodeTestCase;
import java.util.concurrent.TimeUnit;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
@ -107,9 +107,6 @@ import org.opensearch.core.internal.io.IOUtils;
import org.opensearch.index.IndexSettings;
import org.opensearch.index.VersionType;
import org.opensearch.index.codec.CodecService;
import org.opensearch.index.engine.DocIdSeqNoAndSource;
import org.opensearch.index.engine.EngineTestCase;
import org.opensearch.index.engine.InternalTestEngine;
import org.opensearch.index.fieldvisitor.FieldsVisitor;
import org.opensearch.index.mapper.ContentPath;
import org.opensearch.index.mapper.IdFieldMapper;
@ -134,8 +131,8 @@ import org.opensearch.index.seqno.SequenceNumbers;
import org.opensearch.index.shard.ShardId;
import org.opensearch.index.shard.ShardUtils;
import org.opensearch.index.store.Store;
import org.elasticsearch.index.translog.SnapshotMatchers;
import org.elasticsearch.index.translog.TestTranslog;
import org.opensearch.index.translog.SnapshotMatchers;
import org.opensearch.index.translog.TestTranslog;
import org.opensearch.index.translog.Translog;
import org.opensearch.index.translog.TranslogConfig;
import org.opensearch.indices.breaker.NoneCircuitBreakerService;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefBuilder;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,20 +17,17 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.opensearch.common.settings.Settings;
import org.opensearch.core.internal.io.IOUtils;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.translog.SnapshotMatchers;
import org.opensearch.index.translog.SnapshotMatchers;
import org.elasticsearch.index.translog.Translog;
import org.opensearch.test.IndexSettingsModule;
import org.junit.Before;
import org.opensearch.index.engine.DocIdSeqNoAndSource;
import org.opensearch.index.engine.EngineTestCase;
import org.opensearch.index.engine.TranslogHandler;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.opensearch.cluster.routing.RecoverySource.ExistingStoreRecoverySource;
import org.opensearch.cluster.routing.ShardRouting;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortedNumericSelector;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.document.LongPoint;
import org.apache.lucene.search.PointRangeQuery;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.engine;
package org.opensearch.index.engine;
import org.apache.lucene.util.RamUsageTester;
import org.elasticsearch.index.translog.Translog;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.LeafReaderContext;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import com.carrotsearch.randomizedtesting.generators.RandomPicks;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.util.BytesRef;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.opensearch.common.FieldMemoryStats;
import org.opensearch.common.FieldMemoryStatsTests;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.NumericDocValues;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.analysis.core.KeywordAnalyzer;
import org.apache.lucene.document.Document;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.SortField;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
public class PagedBytesStringFieldDataTests extends AbstractStringFieldDataTestCase {

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.elasticsearch.index.fielddata.ScriptDocValues.GeoPoints;
import org.opensearch.common.geo.GeoPoint;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
import org.elasticsearch.index.fielddata.ScriptDocValues.Longs;
import org.opensearch.test.OpenSearchTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata;
package org.opensearch.index.fielddata;
public class SortedSetDVStringFieldDataTests extends AbstractStringFieldDataTestCase {

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata.fieldcomparator;
package org.opensearch.index.fielddata.fieldcomparator;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.SortedDocValuesField;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.fielddata.ordinals;
package org.opensearch.index.fielddata.ordinals;
import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.SortedDocValues;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.fielddata.ordinals;
package org.opensearch.index.fielddata.ordinals;
import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.SortedDocValues;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fielddata.plain;
package org.opensearch.index.fielddata.plain;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.fieldstats;
package org.opensearch.index.fieldstats;
import org.opensearch.action.admin.indices.refresh.RefreshResponse;
import org.opensearch.action.index.IndexResponse;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.get;
package org.opensearch.index.get;
import org.opensearch.common.Strings;
import org.opensearch.common.bytes.BytesReference;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.get;
package org.opensearch.index.get;
import org.opensearch.common.Strings;
import org.opensearch.common.bytes.BytesArray;
@ -51,7 +51,7 @@ import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static org.opensearch.common.xcontent.XContentHelper.toXContent;
import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
import static org.elasticsearch.index.get.DocumentFieldTests.randomDocumentField;
import static org.opensearch.index.get.DocumentFieldTests.randomDocumentField;
import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_PRIMARY_TERM;
import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
import static org.opensearch.test.EqualsHashCodeTestUtils.checkEqualsAndHashCode;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.util.BytesRef;
import org.opensearch.common.bytes.BytesArray;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.util.BytesRef;
import org.opensearch.common.network.InetAddresses;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.IndexableField;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.TermQuery;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.index.mapper.MapperServiceTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.analysis.core.SimpleAnalyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.elasticsearch.index.analysis.AnalyzerScope;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.IndexableField;
import org.opensearch.common.bytes.BytesReference;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.IndexableField;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.document.LongPoint;
import org.apache.lucene.document.NumericDocValuesField;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.elasticsearch.index.IndexSettings;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.index.mapper.MapperServiceTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.analysis.core.KeywordAnalyzer;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.util.BytesRef;
@ -31,8 +31,6 @@ import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.opensearch.index.mapper.MapperServiceTestCase;
import org.opensearch.index.mapper.MockFieldMapper;
import org.opensearch.plugins.Plugin;
import java.io.IOException;
@ -1009,42 +1007,42 @@ public class DocumentParserTests extends MapperServiceTestCase {
}
public void testParseToJsonAndParse() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/simple/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/simple/test-mapping.json");
MapperService mapperService = createMapperService(mapping(b -> {
}));
merge("person", mapperService, mapping);
String builtMapping = mapperService.documentMapper().mappingSource().string();
// reparse it
DocumentMapper builtDocMapper = createDocumentMapper("_doc", builtMapping);
BytesReference json = new BytesArray(copyToBytesFromClasspath("/org/elasticsearch/index/mapper/simple/test1.json"));
BytesReference json = new BytesArray(copyToBytesFromClasspath("/org/opensearch/index/mapper/simple/test1.json"));
Document doc = builtDocMapper.parse(new SourceToParse("test", "_doc", "1", json, XContentType.JSON)).rootDoc();
assertThat(doc.getBinaryValue(builtDocMapper.idFieldMapper().name()), equalTo(Uid.encodeId("1")));
assertThat(doc.get(builtDocMapper.mappers().getMapper("name.first").name()), equalTo("shay"));
}
public void testSimpleParser() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/simple/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/simple/test-mapping.json");
DocumentMapper docMapper = createDocumentMapper("person", mapping);
assertThat((String) docMapper.meta().get("param1"), equalTo("value1"));
BytesReference json = new BytesArray(copyToBytesFromClasspath("/org/elasticsearch/index/mapper/simple/test1.json"));
BytesReference json = new BytesArray(copyToBytesFromClasspath("/org/opensearch/index/mapper/simple/test1.json"));
Document doc = docMapper.parse(new SourceToParse("test", "_doc", "1", json, XContentType.JSON)).rootDoc();
assertThat(doc.getBinaryValue(docMapper.idFieldMapper().name()), equalTo(Uid.encodeId("1")));
assertThat(doc.get(docMapper.mappers().getMapper("name.first").name()), equalTo("shay"));
}
public void testSimpleParserNoTypeNoId() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/simple/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/simple/test-mapping.json");
DocumentMapper docMapper = createDocumentMapper("person", mapping);
BytesReference json = new BytesArray(copyToBytesFromClasspath("/org/elasticsearch/index/mapper/simple/test1-notype-noid.json"));
BytesReference json = new BytesArray(copyToBytesFromClasspath("/org/opensearch/index/mapper/simple/test1-notype-noid.json"));
Document doc = docMapper.parse(new SourceToParse("test", "_doc", "1", json, XContentType.JSON)).rootDoc();
assertThat(doc.getBinaryValue(docMapper.idFieldMapper().name()), equalTo(Uid.encodeId("1")));
assertThat(doc.get(docMapper.mappers().getMapper("name.first").name()), equalTo("shay"));
}
public void testAttributes() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/simple/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/simple/test-mapping.json");
DocumentMapper docMapper = createDocumentMapper("person", mapping);

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TopDocs;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.common.CheckedConsumer;
import org.opensearch.common.Strings;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.Version;
import org.opensearch.common.Strings;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,13 +17,12 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.opensearch.index.mapper.MapperServiceTestCase;
import static org.opensearch.test.StreamsUtils.copyToStringFromClasspath;
import static org.hamcrest.Matchers.equalTo;
@ -63,9 +62,9 @@ public class DynamicTemplatesTests extends MapperServiceTestCase {
}
public void testSimple() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/simple/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/dynamictemplate/simple/test-mapping.json");
MapperService mapperService = createMapperService("person", mapping);
String docJson = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/simple/test-data.json");
String docJson = copyToStringFromClasspath("/org/opensearch/index/mapper/dynamictemplate/simple/test-data.json");
ParsedDocument parsedDoc = mapperService.documentMapper().parse(source(docJson));
merge(mapperService, dynamicMapping(parsedDoc.dynamicMappingsUpdate()));
@ -118,9 +117,9 @@ public class DynamicTemplatesTests extends MapperServiceTestCase {
}
public void testSimpleWithXContentTraverse() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/simple/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/dynamictemplate/simple/test-mapping.json");
MapperService mapperService = createMapperService("person", mapping);
String docJson = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/simple/test-data.json");
String docJson = copyToStringFromClasspath("/org/opensearch/index/mapper/dynamictemplate/simple/test-data.json");
ParsedDocument parsedDoc = mapperService.documentMapper().parse(source(docJson));
merge(mapperService, dynamicMapping(parsedDoc.dynamicMappingsUpdate()));

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,10 +17,11 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.util.BytesRef;
import org.hamcrest.Matchers;
import org.opensearch.common.geo.GeoPoint;
import org.opensearch.plugins.Plugin;
import org.opensearch.index.mapper.MapperServiceTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.opensearch.Version;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import java.util.Collections;
import java.util.HashMap;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.document.Field.Store;
import org.apache.lucene.document.StringField;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.FieldType;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.common.Strings;
import org.opensearch.common.xcontent.XContentFactory;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.action.admin.indices.get.GetIndexRequest;
import org.opensearch.action.admin.indices.get.GetIndexResponse;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Query;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.opensearch.common.collect.Set;
import org.opensearch.test.OpenSearchTestCase;

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.index.IndexableField;
import org.opensearch.common.bytes.BytesArray;
@ -32,13 +32,13 @@ import static org.hamcrest.Matchers.equalTo;
public class GenericStoreDynamicTemplateTests extends OpenSearchSingleNodeTestCase {
public void testSimple() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/genericstore/test-mapping.json");
String mapping = copyToStringFromClasspath("/org/opensearch/index/mapper/dynamictemplate/genericstore/test-mapping.json");
IndexService index = createIndex("test");
client().admin().indices().preparePutMapping("test").setType("person").setSource(mapping, XContentType.JSON).get();
MapperService mapperService = index.mapperService();
byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/genericstore/test-data.json");
byte[] json = copyToBytesFromClasspath("/org/opensearch/index/mapper/dynamictemplate/genericstore/test-data.json");
ParsedDocument parsedDoc = mapperService.documentMapper().parse(
new SourceToParse("test", "person", "1", new BytesArray(json), XContentType.JSON));
client().admin().indices().preparePutMapping("test").setType("person")

View File

@ -7,7 +7,7 @@
* 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
* 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
@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.mapper;
package org.opensearch.index.mapper;
import org.apache.lucene.util.BytesRef;
import org.opensearch.common.geo.GeoPoint;

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