From b48af5b9187833d03cca37355525f865c6bc81f1 Mon Sep 17 00:00:00 2001 From: Mikhaylo Demianenko Date: Mon, 16 Nov 2015 13:38:37 +0100 Subject: [PATCH] Introduce org.neo4j.index.lucene.legacy package for legacy indexes. Move org.neo4j.index.impl.lucene into org.neo4j.index.lucene.legacy. --- .../cypher/performance/DataImportTest.scala | 2 +- .../index/lucene/LuceneKernelExtension.java | 2 +- .../lucene/LuceneKernelExtensionFactory.java | 2 +- .../org/neo4j/index/lucene/QueryContext.java | 2 +- .../legacy}/AbstractIndexHits.java | 2 +- .../legacy}/AbstractLegacyIndexHits.java | 2 +- .../legacy}/CombinedIndexHits.java | 2 +- .../legacy}/CommitContext.java | 2 +- .../legacy}/ConstantScoreIterator.java | 2 +- .../legacy}/DocToIdIterator.java | 2 +- .../lucene => lucene/legacy}/EntityId.java | 3 +- .../lucene => lucene/legacy}/ExactTxData.java | 2 +- .../lucene => lucene/legacy}/FullTxData.java | 4 +- .../legacy}/IndexClockCache.java | 2 +- .../legacy}/IndexIdentifier.java | 2 +- .../legacy}/IndexReference.java | 2 +- .../lucene => lucene/legacy}/IndexType.java | 8 +- .../legacy}/IndexTypeCache.java | 2 +- .../legacy}/LowerCaseKeywordAnalyzer.java | 2 +- .../legacy}/LuceneBatchInserterIndex.java | 15 +- ...ceneBatchInserterIndexProviderNewImpl.java | 7 +- .../legacy}/LuceneCommandApplier.java | 12 +- .../legacy}/LuceneDataSource.java | 3 +- .../lucene => lucene/legacy}/LuceneIndex.java | 20 +- .../legacy}/LuceneIndexImplementation.java | 2 +- .../legacy}/LuceneLegacyIndexTransaction.java | 2 +- .../legacy}/LuceneTransactionState.java | 2 +- .../lucene => lucene/legacy}/LuceneUtil.java | 2 +- .../legacy}/MultipleBackupDeletionPolicy.java | 2 +- .../legacy}/TopDocsIterator.java | 2 +- .../lucene => lucene/legacy}/TxData.java | 2 +- .../legacy}/TxDataHolder.java | 2 +- .../legacy}/package-info.java | 2 +- .../LuceneBatchInserterIndexProvider.java | 2 +- .../api/impl/index/DocValuesCollector.java | 2 +- .../api/impl/index/IndexWriterFactories.java | 4 +- .../legacy}/AbstractLuceneIndexTest.java | 2 +- .../legacy}/AutoIndexerTest.java | 2 +- .../legacy}/BatchInsertionIT.java | 4 +- .../legacy}/BeginTransactionCommand.java | 2 +- .../legacy}/CommandState.java | 2 +- .../legacy}/CommitCommand.java | 2 +- .../lucene => lucene/legacy}/Contains.java | 2 +- .../legacy}/CreateNodeAndIndexByCommand.java | 2 +- .../legacy}/CustomAnalyzer.java | 2 +- .../legacy}/DeleteIndexCommand.java | 2 +- .../lucene => lucene/legacy}/DieCommand.java | 2 +- .../legacy}/IndexCreationTest.java | 2 +- .../lucene => lucene/legacy}/Inserter.java | 2 +- .../legacy}/LuceneCommandApplierTest.java | 4 +- .../legacy}/LuceneDataSourceTest.java | 2 +- .../legacy}/LuceneRecoveryIT.java | 2 +- .../legacy}/MyStandardAnalyzer.java | 2 +- .../legacy}/NonUniqueIndexTests.java | 2 +- .../legacy}/PerformanceAndSanityIT.java | 2 +- .../legacy}/PutIfAbsentCommand.java | 2 +- .../legacy}/QueryIndexCommand.java | 2 +- .../legacy}/RecoveryTest.java | 2 +- .../legacy}/RemoveFromIndexCommand.java | 2 +- .../legacy}/RollbackCommand.java | 2 +- .../legacy}/TestAutoIndexing.java | 2 +- .../legacy}/TestIndexDelectionFs.java | 2 +- .../legacy}/TestIndexDeletion.java | 5 +- .../legacy}/TestIndexNames.java | 2 +- .../legacy}/TestLuceneIndex.java | 175 +++++++++--------- .../legacy}/TestMigration.java | 2 +- .../lucene => lucene/legacy}/WorkThread.java | 2 +- .../api/impl/index/LuceneIndexWriterTest.java | 3 +- .../batchinsert/TestLuceneBatchInsert.java | 10 +- 69 files changed, 190 insertions(+), 195 deletions(-) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/AbstractIndexHits.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/AbstractLegacyIndexHits.java (96%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/CombinedIndexHits.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/CommitContext.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/ConstantScoreIterator.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/DocToIdIterator.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/EntityId.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/ExactTxData.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/FullTxData.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/IndexClockCache.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/IndexIdentifier.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/IndexReference.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/IndexType.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/IndexTypeCache.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LowerCaseKeywordAnalyzer.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneBatchInserterIndex.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneBatchInserterIndexProviderNewImpl.java (94%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneCommandApplier.java (93%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneDataSource.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneIndex.java (96%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneIndexImplementation.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneLegacyIndexTransaction.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneTransactionState.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneUtil.java (99%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/MultipleBackupDeletionPolicy.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TopDocsIterator.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TxData.java (97%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TxDataHolder.java (98%) rename community/lucene-index/src/main/java/org/neo4j/index/{impl/lucene => lucene/legacy}/package-info.java (96%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/AbstractLuceneIndexTest.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/AutoIndexerTest.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/BatchInsertionIT.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/BeginTransactionCommand.java (96%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/CommandState.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/CommitCommand.java (96%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/Contains.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/CreateNodeAndIndexByCommand.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/CustomAnalyzer.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/DeleteIndexCommand.java (96%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/DieCommand.java (96%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/IndexCreationTest.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/Inserter.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneCommandApplierTest.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneDataSourceTest.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/LuceneRecoveryIT.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/MyStandardAnalyzer.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/NonUniqueIndexTests.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/PerformanceAndSanityIT.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/PutIfAbsentCommand.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/QueryIndexCommand.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/RecoveryTest.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/RemoveFromIndexCommand.java (97%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/RollbackCommand.java (96%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TestAutoIndexing.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TestIndexDelectionFs.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TestIndexDeletion.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TestIndexNames.java (98%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TestLuceneIndex.java (91%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/TestMigration.java (99%) rename community/lucene-index/src/test/java/org/neo4j/index/{impl/lucene => lucene/legacy}/WorkThread.java (99%) diff --git a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/DataImportTest.scala b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/DataImportTest.scala index 94a0507374a7..7b83f1aa3751 100644 --- a/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/DataImportTest.scala +++ b/community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/DataImportTest.scala @@ -22,7 +22,7 @@ package org.neo4j.cypher.performance import java.io.File import org.neo4j.cypher.internal.frontend.v3_0.test_helpers.CypherFunSuite import org.neo4j.graphdb.RelationshipType -import org.neo4j.index.impl.lucene.LuceneBatchInserterIndexProviderNewImpl +import org.neo4j.index.lucene.legacy.LuceneBatchInserterIndexProviderNewImpl import org.neo4j.unsafe.batchinsert.{BatchInserter, BatchInserterIndex, BatchInserters} import scala.collection.JavaConverters._ diff --git a/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtension.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtension.java index 93ac25ea0dff..47e1bf1ce957 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtension.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtension.java @@ -23,7 +23,7 @@ import java.util.function.Supplier; import org.neo4j.graphdb.index.IndexProviders; -import org.neo4j.index.impl.lucene.LuceneIndexImplementation; +import org.neo4j.index.lucene.legacy.LuceneIndexImplementation; import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.impl.index.IndexConfigStore; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtensionFactory.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtensionFactory.java index b268184b0cc2..934b568e1deb 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtensionFactory.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/LuceneKernelExtensionFactory.java @@ -20,7 +20,7 @@ package org.neo4j.index.lucene; import org.neo4j.graphdb.index.IndexProviders; -import org.neo4j.index.impl.lucene.LuceneIndexImplementation; +import org.neo4j.index.lucene.legacy.LuceneIndexImplementation; import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.extension.KernelExtensionFactory; import org.neo4j.kernel.impl.index.IndexConfigStore; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/lucene/QueryContext.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/QueryContext.java index 672658ab13f9..d8399093e1ba 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/lucene/QueryContext.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/QueryContext.java @@ -29,7 +29,7 @@ import org.neo4j.graphdb.index.Index; import org.neo4j.graphdb.index.IndexHits; -import org.neo4j.index.impl.lucene.LuceneUtil; +import org.neo4j.index.lucene.legacy.LuceneUtil; /** * This class has the extra query configuration to use diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/AbstractIndexHits.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/AbstractIndexHits.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/AbstractIndexHits.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/AbstractIndexHits.java index 6a286608e463..0abc316f09f8 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/AbstractIndexHits.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/AbstractIndexHits.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Iterator; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/AbstractLegacyIndexHits.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/AbstractLegacyIndexHits.java similarity index 96% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/AbstractLegacyIndexHits.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/AbstractLegacyIndexHits.java index f69d411f365a..440b74a1284e 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/AbstractLegacyIndexHits.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/AbstractLegacyIndexHits.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.collection.primitive.PrimitiveLongCollections.PrimitiveLongBaseIterator; import org.neo4j.kernel.api.LegacyIndexHits; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/CombinedIndexHits.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/CombinedIndexHits.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/CombinedIndexHits.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/CombinedIndexHits.java index 73d483dd9bf1..e42e0d88ba32 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/CombinedIndexHits.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/CombinedIndexHits.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Collection; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/CommitContext.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/CommitContext.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/CommitContext.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/CommitContext.java index 445363af01d6..41f5561c9ac7 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/CommitContext.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/CommitContext.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexWriter; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/ConstantScoreIterator.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/ConstantScoreIterator.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/ConstantScoreIterator.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/ConstantScoreIterator.java index db4b240dff2f..a5865d35f84d 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/ConstantScoreIterator.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/ConstantScoreIterator.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Collection; import java.util.Iterator; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/DocToIdIterator.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/DocToIdIterator.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/DocToIdIterator.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/DocToIdIterator.java index 072550812e93..b00f7e002bc7 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/DocToIdIterator.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/DocToIdIterator.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.document.Document; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/EntityId.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/EntityId.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/EntityId.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/EntityId.java index 16f7b5aa33e3..b08d9d7f0ccb 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/EntityId.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/EntityId.java @@ -17,10 +17,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Store; import org.apache.lucene.document.StringField; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/ExactTxData.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/ExactTxData.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/ExactTxData.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/ExactTxData.java index 39cca99d2152..14ba672b9d9a 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/ExactTxData.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/ExactTxData.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/FullTxData.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/FullTxData.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/FullTxData.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/FullTxData.java index 1f6b269d7620..39d0334766dc 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/FullTxData.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/FullTxData.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field.Store; @@ -55,7 +55,7 @@ import org.neo4j.kernel.api.impl.index.DocValuesCollector; import static java.util.Collections.emptyList; -import static org.neo4j.index.impl.lucene.LuceneIndex.KEY_DOC_ID; +import static org.neo4j.index.lucene.legacy.LuceneIndex.KEY_DOC_ID; class FullTxData extends TxData { diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexClockCache.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexClockCache.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexClockCache.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexClockCache.java index 15c7d289bdde..113121694cd9 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexClockCache.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexClockCache.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.IOException; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexIdentifier.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexIdentifier.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexIdentifier.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexIdentifier.java index 1027961b2bf5..4249e4ba5c0a 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexIdentifier.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexIdentifier.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.kernel.impl.index.IndexEntityType; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexReference.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexReference.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexReference.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexReference.java index 05ad923e9660..785eeab43b95 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexReference.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexReference.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexType.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexType.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexType.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexType.java index d26c261f0c4b..b1c57ef9233b 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexType.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexType.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.document.Document; @@ -56,8 +56,6 @@ import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; -import static org.neo4j.index.impl.lucene.LuceneIndexImplementation.KEY_TO_LOWER_CASE; - public abstract class IndexType { public static final IndexType EXACT = new IndexType( LuceneDataSource.KEYWORD_ANALYZER, false ) @@ -195,8 +193,8 @@ static IndexType getIndexType( Map config ) String type = config.get( LuceneIndexImplementation.KEY_TYPE ); IndexType result = null; Similarity similarity = getCustomSimilarity( config ); - Boolean toLowerCaseUnbiased = config.get( KEY_TO_LOWER_CASE ) != null ? - parseBoolean( config.get( KEY_TO_LOWER_CASE ), true ) : null; + Boolean toLowerCaseUnbiased = config.get( LuceneIndexImplementation.KEY_TO_LOWER_CASE ) != null ? + parseBoolean( config.get( LuceneIndexImplementation.KEY_TO_LOWER_CASE ), true ) : null; Analyzer customAnalyzer = getCustomAnalyzer( config ); if ( type != null ) { diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexTypeCache.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexTypeCache.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexTypeCache.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexTypeCache.java index 8a4dd623f73c..8ec2a8166aa2 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/IndexTypeCache.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/IndexTypeCache.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Collections; import java.util.HashMap; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LowerCaseKeywordAnalyzer.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LowerCaseKeywordAnalyzer.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LowerCaseKeywordAnalyzer.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LowerCaseKeywordAnalyzer.java index 6690af36f648..925af9dbfcd5 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LowerCaseKeywordAnalyzer.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LowerCaseKeywordAnalyzer.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.core.KeywordTokenizer; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneBatchInserterIndex.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneBatchInserterIndex.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneBatchInserterIndex.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneBatchInserterIndex.java index f6e43a1fb122..48af1bddaa9c 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneBatchInserterIndex.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneBatchInserterIndex.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.document.Document; import org.apache.lucene.index.CorruptIndexException; @@ -43,7 +43,6 @@ import org.neo4j.collection.primitive.PrimitiveLongCollections; import org.neo4j.graphdb.ResourceIterator; import org.neo4j.graphdb.index.IndexHits; -import org.neo4j.index.impl.lucene.EntityId.IdData; import org.neo4j.index.lucene.ValueContext; import org.neo4j.kernel.api.LegacyIndexHits; import org.neo4j.kernel.api.exceptions.index.IndexCapacityExceededException; @@ -57,8 +56,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static org.neo4j.index.impl.lucene.LuceneDataSource.getDirectory; - class LuceneBatchInserterIndex implements BatchInserterIndex { private final IndexIdentifier identifier; @@ -118,7 +115,7 @@ private EntityId entityId( long id ) { if ( identifier.entityType == IndexEntityType.Node ) { - return new IdData( id ); + return new EntityId.IdData( id ); } return relationshipLookup.lookup( id ); @@ -157,7 +154,7 @@ private void addToCache( long entityId, String key, Object value ) ids = new HashSet<>(); cache.put( valueAsString, ids ); } - ids.add( new IdData( entityId ) ); + ids.add( new EntityId.IdData( entityId ) ); } } @@ -249,7 +246,7 @@ private void removeFromCache( long entityId, String key, Object value ) Collection ids = cache.get( valueAsString ); if ( ids != null ) { - ids.remove( new IdData(entityId) ); + ids.remove( new EntityId.IdData(entityId) ); } } } @@ -260,7 +257,7 @@ private LuceneIndexWriter instantiateWriter( File directory ) { IndexWriterConfig writerConfig = new IndexWriterConfig( type.analyzer ); writerConfig.setRAMBufferSizeMB( determineGoodBufferSize( writerConfig.getRAMBufferSizeMB() ) ); - Directory luceneDir = getDirectory( directory, identifier ); + Directory luceneDir = LuceneDataSource.getDirectory( directory, identifier ); return IndexWriterFactories.batchInsert( writerConfig ).create( luceneDir ); } catch ( IOException e ) @@ -358,7 +355,7 @@ protected boolean fetchNext() { if ( super.fetchNext() ) { - ids.add( new IdData( next ) ); + ids.add( new EntityId.IdData( next ) ); return true; } addToCache( ids, key, value ); diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneBatchInserterIndexProviderNewImpl.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneBatchInserterIndexProviderNewImpl.java similarity index 94% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneBatchInserterIndexProviderNewImpl.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneBatchInserterIndexProviderNewImpl.java index 20299933ff3f..43574cf1d2a3 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneBatchInserterIndexProviderNewImpl.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneBatchInserterIndexProviderNewImpl.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.File; import java.util.HashMap; @@ -29,8 +29,7 @@ import org.neo4j.graphdb.index.Index; import org.neo4j.graphdb.index.IndexManager; import org.neo4j.helpers.collection.MapUtil; -import org.neo4j.index.impl.lucene.EntityId.RelationshipData; -import org.neo4j.index.impl.lucene.LuceneBatchInserterIndex.RelationshipLookup; +import org.neo4j.index.lucene.legacy.LuceneBatchInserterIndex.RelationshipLookup; import org.neo4j.kernel.impl.index.IndexConfigStore; import org.neo4j.kernel.impl.index.IndexEntityType; import org.neo4j.unsafe.batchinsert.BatchInserter; @@ -62,7 +61,7 @@ public EntityId lookup( long id ) { // TODO too may objects allocated here BatchRelationship rel = inserter.getRelationshipById( id ); - return new RelationshipData( id, rel.getStartNode(), rel.getEndNode() ); + return new EntityId.RelationshipData( id, rel.getStartNode(), rel.getEndNode() ); } }; } diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneCommandApplier.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneCommandApplier.java similarity index 93% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneCommandApplier.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneCommandApplier.java index 9c2d4fc16e9d..522c9fdb7b3e 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneCommandApplier.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneCommandApplier.java @@ -17,16 +17,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.neo4j.graphdb.index.IndexImplementation; -import org.neo4j.index.impl.lucene.CommitContext.DocumentContext; -import org.neo4j.index.impl.lucene.EntityId.IdData; -import org.neo4j.index.impl.lucene.EntityId.RelationshipData; +import org.neo4j.index.lucene.legacy.CommitContext.DocumentContext; import org.neo4j.kernel.impl.index.IndexCommand; import org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand; import org.neo4j.kernel.impl.index.IndexCommand.AddRelationshipCommand; @@ -62,7 +60,7 @@ public boolean visitIndexAddNodeCommand( AddNodeCommand command ) throws IOExcep String key = definitions.getKey( command.getKeyId() ); Object value = command.getValue(); context.ensureWriterInstantiated(); - context.indexType.addToDocument( context.getDocument( new IdData( command.getEntityId() ), true ).document, + context.indexType.addToDocument( context.getDocument( new EntityId.IdData( command.getEntityId() ), true ).document, key, value ); return false; } @@ -74,7 +72,7 @@ public boolean visitIndexAddRelationshipCommand( AddRelationshipCommand command String key = definitions.getKey( command.getKeyId() ); Object value = command.getValue(); context.ensureWriterInstantiated(); - RelationshipData entityId = new RelationshipData( command.getEntityId(), + EntityId.RelationshipData entityId = new EntityId.RelationshipData( command.getEntityId(), command.getStartNode(), command.getEndNode() ); context.indexType.addToDocument( context.getDocument( entityId, true ).document, key, value ); return false; @@ -87,7 +85,7 @@ public boolean visitIndexRemoveCommand( RemoveCommand command ) throws IOExcepti String key = definitions.getKey( command.getKeyId() ); Object value = command.getValue(); context.ensureWriterInstantiated(); - DocumentContext document = context.getDocument( new IdData( command.getEntityId() ), false ); + DocumentContext document = context.getDocument( new EntityId.IdData( command.getEntityId() ), false ); if ( document != null ) { context.indexType.removeFromDocument( document.document, key, value ); diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneDataSource.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneDataSource.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneDataSource.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneDataSource.java index 74379d33575f..9994e40a3e19 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneDataSource.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneDataSource.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Tokenizer; @@ -42,7 +42,6 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; import org.apache.lucene.store.RAMDirectory; -import org.apache.lucene.util.Version; import java.io.File; import java.io.IOException; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneIndex.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneIndex.java similarity index 96% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneIndex.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneIndex.java index 8b5f126e492c..6a17c58e0ff9 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneIndex.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneIndex.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.document.Document; import org.apache.lucene.index.MultiReader; @@ -47,8 +47,6 @@ import org.neo4j.graphdb.index.Index; import org.neo4j.graphdb.index.IndexCommandFactory; import org.neo4j.graphdb.index.IndexHits; -import org.neo4j.index.impl.lucene.EntityId.IdData; -import org.neo4j.index.impl.lucene.EntityId.RelationshipData; import org.neo4j.index.lucene.QueryContext; import org.neo4j.index.lucene.ValueContext; import org.neo4j.kernel.api.LegacyIndex; @@ -102,7 +100,7 @@ public abstract class LuceneIndex implements LegacyIndex public void addNode( long entityId, String key, Object value ) { assertValidKey( key ); - EntityId entity = new IdData( entityId ); + EntityId entity = new EntityId.IdData( entityId ); for ( Object oneValue : IoPrimitiveUtils.asArray( value ) ) { oneValue = getCorrectValue( oneValue ); @@ -148,7 +146,7 @@ private static void assertValidKey( String key ) public void remove( long entityId, String key, Object value ) { assertValidKey( key ); - EntityId entity = new IdData( entityId ); + EntityId entity = new EntityId.IdData( entityId ); for ( Object oneValue : IoPrimitiveUtils.asArray( value ) ) { oneValue = getCorrectValue( oneValue ); @@ -161,7 +159,7 @@ public void remove( long entityId, String key, Object value ) public void remove( long entityId, String key ) { assertValidKey( key ); - EntityId entity = new IdData( entityId ); + EntityId entity = new EntityId.IdData( entityId ); transaction.remove( this, entity, key ); addRemoveCommand( entityId, key, null ); } @@ -169,7 +167,7 @@ public void remove( long entityId, String key ) @Override public void remove( long entityId ) { - EntityId entity = new IdData( entityId ); + EntityId entity = new EntityId.IdData( entityId ); transaction.remove( this, entity ); addRemoveCommand( entityId, null, null ); } @@ -443,7 +441,7 @@ static class RelationshipIndex extends LuceneIndex public void addRelationship( long entityId, String key, Object value, long startNode, long endNode ) { assertValidKey( key ); - RelationshipData entity = new RelationshipData( entityId, startNode, endNode ); + EntityId.RelationshipData entity = new EntityId.RelationshipData( entityId, startNode, endNode ); for ( Object oneValue : IoPrimitiveUtils.asArray( value ) ) { oneValue = getCorrectValue( oneValue ); @@ -495,7 +493,7 @@ public LegacyIndexHits query( String key, Object queryOrQueryObjectOrNull, long public void removeRelationship( long entityId, String key, Object value, long startNode, long endNode ) { assertValidKey( key ); - RelationshipData entity = new RelationshipData( entityId, startNode, endNode ); + EntityId.RelationshipData entity = new EntityId.RelationshipData( entityId, startNode, endNode ); for ( Object oneValue : IoPrimitiveUtils.asArray( value ) ) { oneValue = getCorrectValue( oneValue ); @@ -508,7 +506,7 @@ public void removeRelationship( long entityId, String key, Object value, long st public void removeRelationship( long entityId, String key, long startNode, long endNode ) { assertValidKey( key ); - RelationshipData entity = new RelationshipData( entityId, startNode, endNode ); + EntityId.RelationshipData entity = new EntityId.RelationshipData( entityId, startNode, endNode ); transaction.remove( this, entity, key ); addRemoveCommand( entityId, key, null ); } @@ -516,7 +514,7 @@ public void removeRelationship( long entityId, String key, long startNode, long @Override public void removeRelationship( long entityId, long startNode, long endNode ) { - RelationshipData entity = new RelationshipData( entityId, startNode, endNode ); + EntityId.RelationshipData entity = new EntityId.RelationshipData( entityId, startNode, endNode ); transaction.remove( this, entity ); addRemoveCommand( entityId, null, null ); } diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneIndexImplementation.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneIndexImplementation.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneIndexImplementation.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneIndexImplementation.java index 0079d91b80bd..ece19a2b4595 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneIndexImplementation.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneIndexImplementation.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.File; import java.io.IOException; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneLegacyIndexTransaction.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneLegacyIndexTransaction.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneLegacyIndexTransaction.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneLegacyIndexTransaction.java index ee3db47d6a4a..4ae7a5b69739 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneLegacyIndexTransaction.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneLegacyIndexTransaction.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.HashMap; import java.util.Map; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneTransactionState.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneTransactionState.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneTransactionState.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneTransactionState.java index e3ed3055291b..05c84ff318d1 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneTransactionState.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneTransactionState.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneUtil.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneUtil.java similarity index 99% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneUtil.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneUtil.java index 04d0e2687c9b..514e82a4fd64 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneUtil.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/LuceneUtil.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/MultipleBackupDeletionPolicy.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/MultipleBackupDeletionPolicy.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/MultipleBackupDeletionPolicy.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/MultipleBackupDeletionPolicy.java index 1137a0a10fe7..90f21c73d24d 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/MultipleBackupDeletionPolicy.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/MultipleBackupDeletionPolicy.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.IOException; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TopDocsIterator.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TopDocsIterator.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TopDocsIterator.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TopDocsIterator.java index 8bce9858eb09..5eb1476ac42e 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TopDocsIterator.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TopDocsIterator.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.IOException; import java.util.Iterator; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TxData.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TxData.java similarity index 97% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TxData.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TxData.java index 6be7a8b0a65e..58ecda206f23 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TxData.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TxData.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TxDataHolder.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TxDataHolder.java similarity index 98% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TxDataHolder.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TxDataHolder.java index 96913133d263..3dd62ba3b53e 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/TxDataHolder.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/TxDataHolder.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/package-info.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/package-info.java similarity index 96% rename from community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/package-info.java rename to community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/package-info.java index 4413fb0d52e1..2f5799a2fd35 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/package-info.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/legacy/package-info.java @@ -24,5 +24,5 @@ * indexing. There is also a batch inserter included for inserting large * amounts of data. */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; diff --git a/community/lucene-index/src/main/java/org/neo4j/index/lucene/unsafe/batchinsert/LuceneBatchInserterIndexProvider.java b/community/lucene-index/src/main/java/org/neo4j/index/lucene/unsafe/batchinsert/LuceneBatchInserterIndexProvider.java index 1e76c1bb52a9..7070b83d784e 100644 --- a/community/lucene-index/src/main/java/org/neo4j/index/lucene/unsafe/batchinsert/LuceneBatchInserterIndexProvider.java +++ b/community/lucene-index/src/main/java/org/neo4j/index/lucene/unsafe/batchinsert/LuceneBatchInserterIndexProvider.java @@ -22,7 +22,7 @@ import java.util.Map; import org.neo4j.graphdb.index.Index; -import org.neo4j.index.impl.lucene.LuceneBatchInserterIndexProviderNewImpl; +import org.neo4j.index.lucene.legacy.LuceneBatchInserterIndexProviderNewImpl; import org.neo4j.unsafe.batchinsert.BatchInserter; import org.neo4j.unsafe.batchinsert.BatchInserterIndex; import org.neo4j.unsafe.batchinsert.BatchInserterIndexProvider; diff --git a/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/DocValuesCollector.java b/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/DocValuesCollector.java index 680c42a84f24..f842c168fa2b 100644 --- a/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/DocValuesCollector.java +++ b/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/DocValuesCollector.java @@ -54,7 +54,7 @@ import org.neo4j.graphdb.index.IndexHits; import org.neo4j.helpers.collection.ArrayIterator; import org.neo4j.helpers.collection.PrefetchingIterator; -import org.neo4j.index.impl.lucene.AbstractIndexHits; +import org.neo4j.index.lucene.legacy.AbstractIndexHits; /** * Collector to record per-segment {@code DocIdSet}s and {@code LeafReaderContext}s for every diff --git a/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/IndexWriterFactories.java b/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/IndexWriterFactories.java index c3b474f292d4..3b1d6254caed 100644 --- a/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/IndexWriterFactories.java +++ b/community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/IndexWriterFactories.java @@ -23,8 +23,8 @@ import org.apache.lucene.index.LogByteSizeMergePolicy; import org.neo4j.helpers.Settings; -import org.neo4j.index.impl.lucene.LuceneDataSource; -import org.neo4j.index.impl.lucene.MultipleBackupDeletionPolicy; +import org.neo4j.index.lucene.legacy.LuceneDataSource; +import org.neo4j.index.lucene.legacy.MultipleBackupDeletionPolicy; public final class IndexWriterFactories { diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/AbstractLuceneIndexTest.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/AbstractLuceneIndexTest.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/AbstractLuceneIndexTest.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/AbstractLuceneIndexTest.java index 64915d0f4fe3..9e2e5e686af6 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/AbstractLuceneIndexTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/AbstractLuceneIndexTest.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Map; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/AutoIndexerTest.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/AutoIndexerTest.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/AutoIndexerTest.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/AutoIndexerTest.java index 4a35e87b0c73..e67d665c3179 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/AutoIndexerTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/AutoIndexerTest.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Rule; import org.junit.Test; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/BatchInsertionIT.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/BatchInsertionIT.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/BatchInsertionIT.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/BatchInsertionIT.java index 88006bf4a58a..92bbcf5ac469 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/BatchInsertionIT.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/BatchInsertionIT.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Ignore; import org.junit.Rule; @@ -44,7 +44,7 @@ import static org.neo4j.graphdb.Label.label; import static org.neo4j.helpers.collection.IteratorUtil.count; import static org.neo4j.helpers.collection.MapUtil.map; -import static org.neo4j.index.impl.lucene.LuceneIndexImplementation.EXACT_CONFIG; +import static org.neo4j.index.lucene.legacy.LuceneIndexImplementation.EXACT_CONFIG; public class BatchInsertionIT { diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/BeginTransactionCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/BeginTransactionCommand.java similarity index 96% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/BeginTransactionCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/BeginTransactionCommand.java index f02cefd6c861..97049152d93b 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/BeginTransactionCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/BeginTransactionCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommandState.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CommandState.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommandState.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CommandState.java index c7de4aedb29a..4dfaa2e981c3 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommandState.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CommandState.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommitCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CommitCommand.java similarity index 96% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommitCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CommitCommand.java index b1366685b16f..f47c1397ba87 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommitCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CommitCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/Contains.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/Contains.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/Contains.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/Contains.java index 9e1fc3272cd2..1b83e50d0b50 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/Contains.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/Contains.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Collection; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CreateNodeAndIndexByCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CreateNodeAndIndexByCommand.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CreateNodeAndIndexByCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CreateNodeAndIndexByCommand.java index c5603ecfc689..a373becf3fc0 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CreateNodeAndIndexByCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CreateNodeAndIndexByCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CustomAnalyzer.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CustomAnalyzer.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CustomAnalyzer.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CustomAnalyzer.java index 3252ee731794..d36cf0b051fe 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/CustomAnalyzer.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/CustomAnalyzer.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Tokenizer; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/DeleteIndexCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/DeleteIndexCommand.java similarity index 96% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/DeleteIndexCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/DeleteIndexCommand.java index d4318dca6399..5e9b8885334d 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/DeleteIndexCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/DeleteIndexCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/DieCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/DieCommand.java similarity index 96% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/DieCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/DieCommand.java index 6b818f377919..b45bf0748139 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/DieCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/DieCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/IndexCreationTest.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/IndexCreationTest.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/IndexCreationTest.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/IndexCreationTest.java index 50c96e87e6ed..a71076441b0c 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/IndexCreationTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/IndexCreationTest.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.After; import org.junit.Before; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/Inserter.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/Inserter.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/Inserter.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/Inserter.java index ffa8b65ef531..cd0a095e57bd 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/Inserter.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/Inserter.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.io.File; import java.io.IOException; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneCommandApplierTest.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneCommandApplierTest.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneCommandApplierTest.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneCommandApplierTest.java index 94797b60fc9a..08d3c4774b13 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneCommandApplierTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneCommandApplierTest.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Rule; import org.junit.Test; @@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify; import static org.neo4j.helpers.collection.MapUtil.stringMap; -import static org.neo4j.index.impl.lucene.LuceneIndexImplementation.EXACT_CONFIG; +import static org.neo4j.index.lucene.legacy.LuceneIndexImplementation.EXACT_CONFIG; public class LuceneCommandApplierTest { diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneDataSourceTest.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneDataSourceTest.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneDataSourceTest.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneDataSourceTest.java index 4de908003129..ce9c43cd7b6c 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneDataSourceTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneDataSourceTest.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterAccessor; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneRecoveryIT.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneRecoveryIT.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneRecoveryIT.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneRecoveryIT.java index 921a782c7d05..53e3d7f1c8e8 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/LuceneRecoveryIT.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/LuceneRecoveryIT.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Test; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/MyStandardAnalyzer.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/MyStandardAnalyzer.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/MyStandardAnalyzer.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/MyStandardAnalyzer.java index 7fa7acdb371c..2599d6ed3490 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/MyStandardAnalyzer.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/MyStandardAnalyzer.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.AnalyzerWrapper; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/NonUniqueIndexTests.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/NonUniqueIndexTests.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/NonUniqueIndexTests.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/NonUniqueIndexTests.java index ad4ffe77c540..a59a4ac38695 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/NonUniqueIndexTests.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/NonUniqueIndexTests.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Rule; import org.junit.Test; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/PerformanceAndSanityIT.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/PerformanceAndSanityIT.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/PerformanceAndSanityIT.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/PerformanceAndSanityIT.java index e320eb4403b0..913649e725ac 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/PerformanceAndSanityIT.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/PerformanceAndSanityIT.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.index.Term; import org.apache.lucene.search.TermQuery; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/PutIfAbsentCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/PutIfAbsentCommand.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/PutIfAbsentCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/PutIfAbsentCommand.java index 92f196ca65bc..c1acc0bc9065 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/PutIfAbsentCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/PutIfAbsentCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.graphdb.Node; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/QueryIndexCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/QueryIndexCommand.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/QueryIndexCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/QueryIndexCommand.java index 7c8e32fdbd1d..3dc2cb7497e1 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/QueryIndexCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/QueryIndexCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.index.IndexHits; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RecoveryTest.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RecoveryTest.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RecoveryTest.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RecoveryTest.java index 3c65929c716f..4d62ad5467fe 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RecoveryTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RecoveryTest.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Rule; import org.junit.Test; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RemoveFromIndexCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RemoveFromIndexCommand.java similarity index 97% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RemoveFromIndexCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RemoveFromIndexCommand.java index 04d002860e17..4a7036230a59 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RemoveFromIndexCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RemoveFromIndexCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RollbackCommand.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RollbackCommand.java similarity index 96% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RollbackCommand.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RollbackCommand.java index 505b28b6bba0..e87335b17ba0 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/RollbackCommand.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/RollbackCommand.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.neo4j.test.OtherThreadExecutor.WorkerCommand; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestAutoIndexing.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestAutoIndexing.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestAutoIndexing.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestAutoIndexing.java index f102cb421a91..7421519b1525 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestAutoIndexing.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestAutoIndexing.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.HashMap; import java.util.Map; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexDelectionFs.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexDelectionFs.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexDelectionFs.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexDelectionFs.java index 84f0071ce7ea..5b2eb51e2f10 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexDelectionFs.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexDelectionFs.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.AfterClass; import org.junit.BeforeClass; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexDeletion.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexDeletion.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexDeletion.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexDeletion.java index f1461a0d5fec..1371a674d899 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexDeletion.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexDeletion.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.ArrayList; import java.util.List; @@ -44,7 +44,6 @@ import static org.junit.Assert.fail; import static org.neo4j.index.Neo4jTestCase.assertContains; -import static org.neo4j.index.impl.lucene.Contains.contains; public class TestIndexDeletion { @@ -264,7 +263,7 @@ public void indexDeletesShouldNotByVisibleUntilCommit() throws Exception try ( Transaction transaction = graphDb.beginTx() ) { IndexHits indexHits = index.get( key, value ); - assertThat( indexHits, contains( node ) ); + assertThat( indexHits, Contains.contains( node ) ); } firstTx.rollback(); diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexNames.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexNames.java similarity index 98% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexNames.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexNames.java index 70095321a957..b64c41836650 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestIndexNames.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestIndexNames.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Arrays; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestLuceneIndex.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestLuceneIndex.java similarity index 91% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestLuceneIndex.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestLuceneIndex.java index 6bedf8d0c5e9..12548c4059fd 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestLuceneIndex.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestLuceneIndex.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper; import org.apache.lucene.index.Term; @@ -76,8 +76,7 @@ import static org.neo4j.helpers.collection.MapUtil.stringMap; import static org.neo4j.index.Neo4jTestCase.assertContains; import static org.neo4j.index.Neo4jTestCase.assertContainsInOrder; -import static org.neo4j.index.impl.lucene.Contains.contains; -import static org.neo4j.index.impl.lucene.LuceneIndexImplementation.EXACT_CONFIG; +import static org.neo4j.index.lucene.legacy.LuceneIndexImplementation.EXACT_CONFIG; import static org.neo4j.index.lucene.QueryContext.numericRange; import static org.neo4j.index.lucene.ValueContext.numeric; @@ -99,18 +98,18 @@ private void makeSureAdditionsCanBeRead( index.add( entity1, key, value ); for ( int i = 0; i < 2; i++ ) { - assertThat( index.get( key, value ), contains( entity1 ) ); - assertThat( index.query( key, "*" ), contains( entity1 ) ); - assertThat( index.get( key, value ), contains( entity1 ) ); + assertThat( index.get( key, value ), Contains.contains( entity1 ) ); + assertThat( index.query( key, "*" ), Contains.contains( entity1 ) ); + assertThat( index.get( key, value ), Contains.contains( entity1 ) ); restartTx(); } index.add( entity2, key, value ); - assertThat( index.get( key, value ), contains( entity1, entity2 ) ); + assertThat( index.get( key, value ), Contains.contains( entity1, entity2 ) ); restartTx(); - assertThat( index.get( key, value ), contains( entity1, entity2 ) ); + assertThat( index.get( key, value ), Contains.contains( entity1, entity2 ) ); index.delete(); } @@ -120,7 +119,7 @@ public void makeSureYouGetLatestTxModificationsInQueryByDefault() Index index = nodeIndex( LuceneIndexImplementation.FULLTEXT_CONFIG ); Node node = graphDb.createNode(); index.add( node, "key", "value" ); - assertThat( index.query( "key:value" ), contains( node ) ); + assertThat( index.query( "key:value" ), Contains.contains( node ) ); } @Test @@ -348,9 +347,9 @@ private void makeSureThereCanBeMoreThanOneValueForAKeyAndEntity( index.add( node, key, value3 ); for ( int i = 0; i < 2; i++ ) { - assertThat( index.get( key, value1 ), contains( node ) ); - assertThat( index.get( key, value2 ), contains( node ) ); - assertThat( index.get( key, value3 ), contains( node ) ); + assertThat( index.get( key, value1 ), Contains.contains( node ) ); + assertThat( index.get( key, value2 ), Contains.contains( node ) ); + assertThat( index.get( key, value3 ), Contains.contains( node ) ); assertThat( index.get( key, "whatever" ), emptyIterable() ); restartTx(); } @@ -375,7 +374,7 @@ public void shouldNotGetLatestTxModificationsWhenChoosingSpeedQueries() index.add( node, "key", "value" ); QueryContext queryContext = new QueryContext( "value" ).tradeCorrectnessForSpeed(); assertThat( index.query( "key", queryContext ), emptyIterable() ); - assertThat( index.query( "key", "value" ), contains( node ) ); + assertThat( index.query( "key", "value" ), Contains.contains( node ) ); } @Test @@ -391,9 +390,9 @@ public void makeSureArrayValuesAreSupported() index.add( node, key, new String[]{value1, value2, value3} ); for ( int i = 0; i < 2; i++ ) { - assertThat( index.get( key, value1 ), contains( node ) ); - assertThat( index.get( key, value2 ), contains( node ) ); - assertThat( index.get( key, value3 ), contains( node ) ); + assertThat( index.get( key, value1 ), Contains.contains( node ) ); + assertThat( index.get( key, value2 ), Contains.contains( node ) ); + assertThat( index.get( key, value3 ), Contains.contains( node ) ); assertThat( index.get( key, "whatever" ), emptyIterable() ); restartTx(); } @@ -402,7 +401,7 @@ public void makeSureArrayValuesAreSupported() for ( int i = 0; i < 2; i++ ) { - assertThat( index.get( key, value1 ), contains( node ) ); + assertThat( index.get( key, value1 ), Contains.contains( node ) ); assertThat( index.get( key, value2 ), emptyIterable() ); assertThat( index.get( key, value3 ), emptyIterable() ); restartTx(); @@ -424,13 +423,13 @@ public void makeSureWildcardQueriesCanBeAsked() for ( int i = 0; i < 2; i++ ) { - assertThat( index.query( key, "neo*" ), contains( node1 ) ); - assertThat( index.query( key, "n?o4j" ), contains( node1 ) ); - assertThat( index.query( key, "ne*" ), contains( node1, node2 ) ); - assertThat( index.query( key + ":neo4j" ), contains( node1 ) ); - assertThat( index.query( key + ":neo*" ), contains( node1 ) ); - assertThat( index.query( key + ":n?o4j" ), contains( node1 ) ); - assertThat( index.query( key + ":ne*" ), contains( node1, node2 ) ); + assertThat( index.query( key, "neo*" ), Contains.contains( node1 ) ); + assertThat( index.query( key, "n?o4j" ), Contains.contains( node1 ) ); + assertThat( index.query( key, "ne*" ), Contains.contains( node1, node2 ) ); + assertThat( index.query( key + ":neo4j" ), Contains.contains( node1 ) ); + assertThat( index.query( key + ":neo*" ), Contains.contains( node1 ) ); + assertThat( index.query( key + ":n?o4j" ), Contains.contains( node1 ) ); + assertThat( index.query( key + ":ne*" ), Contains.contains( node1, node2 ) ); restartTx(); } @@ -450,10 +449,14 @@ public void makeSureCompositeQueriesCanBeAsked() for ( int i = 0; i < 2; i++ ) { - assertThat( index.query( "username:*@matrix AND sex:male" ), contains( neo ) ); - assertThat( index.query( new QueryContext( "username:*@matrix sex:male" ).defaultOperator( Operator.AND ) ), contains( neo ) ); - assertThat( index.query( "username:*@matrix OR sex:male" ), contains( neo, trinity ) ); - assertThat( index.query( new QueryContext( "username:*@matrix sex:male" ).defaultOperator( Operator.OR ) ), contains( neo, trinity ) ); + assertThat( index.query( "username:*@matrix AND sex:male" ), Contains.contains( neo ) ); + assertThat( index.query( new QueryContext( "username:*@matrix sex:male" ).defaultOperator( Operator.AND ) ), Contains + + + .contains( neo ) ); + assertThat( index.query( "username:*@matrix OR sex:male" ), Contains.contains( neo, trinity ) ); + assertThat( index.query( new QueryContext( "username:*@matrix sex:male" ).defaultOperator( Operator.OR ) ), Contains + .contains( neo, trinity ) ); restartTx(); } @@ -476,7 +479,7 @@ private void doSomeRandomUseCaseTestingWithExactIn assertNull( index.get( name, mattias ).getSingle() ); index.add( entity1, name, mattias ); - assertThat( index.get( name, mattias ), contains( entity1 ) ); + assertThat( index.get( name, mattias ), Contains.contains( entity1 ) ); assertContains( index.query( name, "\"" + mattias + "\"" ), entity1 ); assertContains( index.query( "name:\"" + mattias + "\"" ), entity1 ); @@ -488,18 +491,18 @@ private void doSomeRandomUseCaseTestingWithExactIn commitTx(); beginTx(); - assertThat( index.get( name, mattias ), contains( entity1 ) ); - assertThat( index.query( name, "\"" + mattias + "\"" ), contains( entity1 ) ); - assertThat( index.query( "name:\"" + mattias + "\"" ), contains( entity1 ) ); + assertThat( index.get( name, mattias ), Contains.contains( entity1 ) ); + assertThat( index.query( name, "\"" + mattias + "\"" ), Contains.contains( entity1 ) ); + assertThat( index.query( "name:\"" + mattias + "\"" ), Contains.contains( entity1 ) ); assertEquals( entity1, index.get( name, mattias ).getSingle() ); - assertThat( index.query( "name", "Mattias*" ), contains( entity1 ) ); + assertThat( index.query( "name", "Mattias*" ), Contains.contains( entity1 ) ); commitTx(); beginTx(); index.add( entity2, title, hacker ); index.add( entity1, title, hacker ); - assertThat( index.get( name, mattias ), contains( entity1 ) ); - assertThat( index.get( title, hacker ), contains( entity1, entity2 ) ); + assertThat( index.get( name, mattias ), Contains.contains( entity1 ) ); + assertThat( index.get( title, hacker ), Contains.contains( entity1, entity2 ) ); assertContains( index.query( "name:\"" + mattias + "\" OR title:\"" + hacker + "\"" ), entity1, entity2 ); @@ -507,17 +510,18 @@ private void doSomeRandomUseCaseTestingWithExactIn commitTx(); beginTx(); - assertThat( index.get( name, mattias ), contains( entity1 ) ); - assertThat( index.get( title, hacker ), contains( entity1, entity2 ) ); - assertThat( index.query( "name:\"" + mattias + "\" OR title:\"" + hacker + "\"" ), contains( entity1, entity2 ) ); + assertThat( index.get( name, mattias ), Contains.contains( entity1 ) ); + assertThat( index.get( title, hacker ), Contains.contains( entity1, entity2 ) ); + assertThat( index.query( "name:\"" + mattias + "\" OR title:\"" + hacker + "\"" ), Contains + .contains( entity1, entity2 ) ); assertThat( index.query( "name:\"" + mattias + "\" AND title:\"" + - hacker + "\"" ), contains( entity1 ) ); + hacker + "\"" ), Contains.contains( entity1 ) ); commitTx(); beginTx(); index.remove( entity2, title, hacker ); - assertThat( index.get( name, mattias ), contains( entity1 ) ); - assertThat( index.get( title, hacker ), contains( entity1 ) ); + assertThat( index.get( name, mattias ), Contains.contains( entity1 ) ); + assertThat( index.get( title, hacker ), Contains.contains( entity1 ) ); assertContains( index.query( "name:\"" + mattias + "\" OR title:\"" + hacker + "\"" ), entity1 ); @@ -525,10 +529,10 @@ private void doSomeRandomUseCaseTestingWithExactIn commitTx(); beginTx(); - assertThat( index.get( name, mattias ), contains( entity1 ) ); - assertThat( index.get( title, hacker ), contains( entity1 ) ); + assertThat( index.get( name, mattias ), Contains.contains( entity1 ) ); + assertThat( index.get( title, hacker ), Contains.contains( entity1 ) ); assertThat( index.query( "name:\"" + mattias + "\" OR title:\"" + - hacker + "\"" ), contains( entity1 ) ); + hacker + "\"" ), Contains.contains( entity1 ) ); commitTx(); beginTx(); @@ -566,12 +570,12 @@ private void doSomeRandomTestingWithFulltextIndex( for ( int i = 0; i < 2; i++ ) { - assertThat( index.get( key, "The quick brown fox" ), contains( entity1 ) ); - assertThat( index.get( key, "brown fox jumped over" ), contains( entity2 ) ); - assertThat( index.query( key, "quick" ), contains( entity1 ) ); - assertThat( index.query( key, "brown" ), contains( entity1, entity2 ) ); - assertThat( index.query( key, "quick OR jumped" ), contains( entity1, entity2 ) ); - assertThat( index.query( key, "brown AND fox" ), contains( entity1, entity2 ) ); + assertThat( index.get( key, "The quick brown fox" ), Contains.contains( entity1 ) ); + assertThat( index.get( key, "brown fox jumped over" ), Contains.contains( entity2 ) ); + assertThat( index.query( key, "quick" ), Contains.contains( entity1 ) ); + assertThat( index.query( key, "brown" ), Contains.contains( entity1, entity2 ) ); + assertThat( index.query( key, "quick OR jumped" ), Contains.contains( entity1, entity2 ) ); + assertThat( index.query( key, "brown AND fox" ), Contains.contains( entity1, entity2 ) ); restartTx(); } @@ -610,13 +614,13 @@ public void testNodeLocalRelationshipIndex() for ( int i = 0; i < 2; i++ ) { - assertThat( index.query( "name:something" ), contains( rel1, rel2 ) ); - assertThat( index.query( "name:something", null, endNode1 ), contains( rel1 ) ); - assertThat( index.query( "name:something", startNode, endNode2 ), contains( rel2 ) ); - assertThat( index.query( null, startNode, endNode1 ), contains( rel1 ) ); - assertThat( index.get( "name", "something", null, endNode1 ), contains( rel1 ) ); - assertThat( index.get( "name", "something", startNode, endNode2 ), contains( rel2 ) ); - assertThat( index.get( null, null, startNode, endNode1 ), contains( rel1 ) ); + assertThat( index.query( "name:something" ), Contains.contains( rel1, rel2 ) ); + assertThat( index.query( "name:something", null, endNode1 ), Contains.contains( rel1 ) ); + assertThat( index.query( "name:something", startNode, endNode2 ), Contains.contains( rel2 ) ); + assertThat( index.query( null, startNode, endNode1 ), Contains.contains( rel1 ) ); + assertThat( index.get( "name", "something", null, endNode1 ), Contains.contains( rel1 ) ); + assertThat( index.get( "name", "something", startNode, endNode2 ), Contains.contains( rel2 ) ); + assertThat( index.get( null, null, startNode, endNode1 ), Contains.contains( rel1 ) ); restartTx(); } @@ -724,16 +728,20 @@ private void testNumericValues( Index index ) for ( int i = 0; i < 2; i++ ) { - assertThat( index.query( NumericRangeQuery.newIntRange( key, 4, 40, true, true ) ), contains( node10, node6, node31 ) ); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 6, 15, true, true ) ), contains( node10, node6 ) ); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 6, 15, false, true ) ), contains( node10 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 4, 40, true, true ) ), Contains + .contains( node10, node6, node31 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 6, 15, true, true ) ), Contains + .contains( node10, node6 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 6, 15, false, true ) ), Contains.contains( node10 ) ); restartTx(); } index.remove( node6, key, numeric( 6 ) ); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 4, 40, true, true ) ), contains( node10, node31 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 4, 40, true, true ) ), Contains + .contains( node10, node31 ) ); restartTx(); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 4, 40, true, true ) ), contains( node10, node31 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 4, 40, true, true ) ), Contains + .contains( node10, node31 ) ); } @Test @@ -748,15 +756,15 @@ public void testNumericValueArrays() IndexHits indexResult1 = index.query( "number", newIntRange( "number", 47, 98, true, true ) ); - assertThat( indexResult1, contains( node1, node2 ) ); + assertThat( indexResult1, Contains.contains( node1, node2 ) ); assertThat( indexResult1.size(), is( 2 )); IndexHits indexResult2 = index.query( "number", newIntRange( "number", 44, 46, true, true ) ); - assertThat( indexResult2, contains( node1 ) ); + assertThat( indexResult2, Contains.contains( node1 ) ); assertThat( indexResult2.size(), is( 1 ) ); IndexHits indexResult3 = index.query( "number", newIntRange( "number", 99, 101, true, true ) ); - assertThat( indexResult3, contains( node2 ) ); + assertThat( indexResult3, Contains.contains( node2 ) ); assertThat( indexResult3.size(), is( 1 ) ); IndexHits indexResult4 = index.query( "number", newIntRange( "number", 47, 98, false, false ) ); @@ -780,7 +788,7 @@ public void testRemoveNumericValues() index.add( node2, key, new ValueContext( 5 ).indexNumeric() ); index.remove( node1, key, new ValueContext( 15 ).indexNumeric() ); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), contains( node2 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), Contains.contains( node2 ) ); index.remove( node2, key, new ValueContext( 5 ).indexNumeric() ); @@ -792,13 +800,14 @@ public void testRemoveNumericValues() index.add( node1, key, new ValueContext( 15 ).indexNumeric() ); index.add( node2, key, new ValueContext( 5 ).indexNumeric() ); restartTx(); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), contains( node1, node2 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), Contains + .contains( node1, node2 ) ); index.remove( node1, key, new ValueContext( 15 ).indexNumeric() ); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), contains( node2 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), Contains.contains( node2 ) ); restartTx(); - assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), contains( node2 ) ); + assertThat( index.query( NumericRangeQuery.newIntRange( key, 0, 20, false, false ) ), Contains.contains( node2 ) ); } @Test @@ -859,12 +868,12 @@ public void makeSureFulltextConfigIsCaseInsensitiveByDefault() index.add( node, key, value ); for ( int i = 0; i < 2; i++ ) { - assertThat( index.query( "name", "[A TO Z]" ), contains( node ) ); - assertThat( index.query( "name", "[a TO z]" ), contains( node ) ); - assertThat( index.query( "name", "Mattias" ), contains( node ) ); - assertThat( index.query( "name", "mattias" ), contains( node ) ); - assertThat( index.query( "name", "Matt*" ), contains( node ) ); - assertThat( index.query( "name", "matt*" ), contains( node ) ); + assertThat( index.query( "name", "[A TO Z]" ), Contains.contains( node ) ); + assertThat( index.query( "name", "[a TO z]" ), Contains.contains( node ) ); + assertThat( index.query( "name", "Mattias" ), Contains.contains( node ) ); + assertThat( index.query( "name", "mattias" ), Contains.contains( node ) ); + assertThat( index.query( "name", "Matt*" ), Contains.contains( node ) ); + assertThat( index.query( "name", "matt*" ), Contains.contains( node ) ); restartTx(); } } @@ -881,11 +890,11 @@ public void makeSureFulltextIndexCanBeCaseSensitive() index.add( node, key, value ); for ( int i = 0; i < 2; i++ ) { - assertThat( index.query( "name", "[A TO Z]" ), contains( node ) ); + assertThat( index.query( "name", "[A TO Z]" ), Contains.contains( node ) ); assertThat( index.query( "name", "[a TO z]" ), emptyIterable() ); - assertThat( index.query( "name", "Matt*" ), contains( node ) ); + assertThat( index.query( "name", "Matt*" ), Contains.contains( node ) ); assertThat( index.query( "name", "matt*" ), emptyIterable() ); - assertThat( index.query( "name", "Persson" ), contains( node ) ); + assertThat( index.query( "name", "Persson" ), Contains.contains( node ) ); assertThat( index.query( "name", "persson" ), emptyIterable() ); restartTx(); } @@ -896,7 +905,7 @@ public void makeSureCustomAnalyzerCanBeUsed() { CustomAnalyzer.called = false; Index index = nodeIndex( MapUtil.stringMap( - IndexManager.PROVIDER, "lucene", "analyzer", org.neo4j.index.impl.lucene.CustomAnalyzer.class.getName(), + IndexManager.PROVIDER, "lucene", "analyzer", CustomAnalyzer.class.getName(), "to_lower_case", "true" ) ); Node node = graphDb.createNode(); String key = "name"; @@ -904,7 +913,7 @@ public void makeSureCustomAnalyzerCanBeUsed() index.add( node, key, value ); restartTx(); assertTrue( CustomAnalyzer.called ); - assertThat( index.query( key, "[A TO Z]" ), contains( node ) ); + assertThat( index.query( key, "[A TO Z]" ), Contains.contains( node ) ); } @Test @@ -912,7 +921,7 @@ public void makeSureCustomAnalyzerCanBeUsed2() { CustomAnalyzer.called = false; Index index = nodeIndex( "w-custom-analyzer-2", MapUtil.stringMap( - IndexManager.PROVIDER, "lucene", "analyzer", org.neo4j.index.impl.lucene.CustomAnalyzer.class.getName(), + IndexManager.PROVIDER, "lucene", "analyzer", CustomAnalyzer.class.getName(), "to_lower_case", "true", "type", "fulltext" ) ); Node node = graphDb.createNode(); String key = "name"; @@ -920,7 +929,7 @@ public void makeSureCustomAnalyzerCanBeUsed2() index.add( node, key, value ); restartTx(); assertTrue( CustomAnalyzer.called ); - assertThat( index.query( key, "[A TO Z]" ), contains( node ) ); + assertThat( index.query( key, "[A TO Z]" ), Contains.contains( node ) ); } @Test @@ -1020,7 +1029,7 @@ public void makeSureYouCanRemoveFromRelationshipIndex() for ( int i = 0; i < 2; i++ ) { assertThat( index.get( key, "value" ), emptyIterable() ); - assertThat( index.get( key, "otherValue" ), contains( r ) ); + assertThat( index.get( key, "otherValue" ), Contains.contains( r ) ); restartTx(); } } diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestMigration.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestMigration.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestMigration.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestMigration.java index a10491fba733..1d8cf107a9c7 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestMigration.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/TestMigration.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import org.junit.Ignore; import org.junit.Test; diff --git a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/WorkThread.java b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/WorkThread.java similarity index 99% rename from community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/WorkThread.java rename to community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/WorkThread.java index 96ae8cc75e10..d527d674d7d2 100644 --- a/community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/WorkThread.java +++ b/community/lucene-index/src/test/java/org/neo4j/index/lucene/legacy/WorkThread.java @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.index.impl.lucene; +package org.neo4j.index.lucene.legacy; import java.util.Map; import java.util.concurrent.Future; diff --git a/community/lucene-index/src/test/java/org/neo4j/kernel/api/impl/index/LuceneIndexWriterTest.java b/community/lucene-index/src/test/java/org/neo4j/kernel/api/impl/index/LuceneIndexWriterTest.java index 75c89380ff36..b93aaa6acd7b 100644 --- a/community/lucene-index/src/test/java/org/neo4j/kernel/api/impl/index/LuceneIndexWriterTest.java +++ b/community/lucene-index/src/test/java/org/neo4j/kernel/api/impl/index/LuceneIndexWriterTest.java @@ -25,7 +25,6 @@ import org.apache.lucene.document.Field.Store; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.store.Directory; -import org.apache.lucene.util.Version; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -34,7 +33,7 @@ import java.io.IOException; import static org.junit.Assert.assertTrue; -import static org.neo4j.index.impl.lucene.LuceneDataSource.KEYWORD_ANALYZER; +import static org.neo4j.index.lucene.legacy.LuceneDataSource.KEYWORD_ANALYZER; public class LuceneIndexWriterTest { diff --git a/community/lucene-index/src/test/java/org/neo4j/unsafe/batchinsert/TestLuceneBatchInsert.java b/community/lucene-index/src/test/java/org/neo4j/unsafe/batchinsert/TestLuceneBatchInsert.java index 1d46664f6597..381379043bfe 100644 --- a/community/lucene-index/src/test/java/org/neo4j/unsafe/batchinsert/TestLuceneBatchInsert.java +++ b/community/lucene-index/src/test/java/org/neo4j/unsafe/batchinsert/TestLuceneBatchInsert.java @@ -44,9 +44,9 @@ import org.neo4j.graphdb.index.IndexHits; import org.neo4j.graphdb.index.IndexManager; import org.neo4j.helpers.Service; -import org.neo4j.index.impl.lucene.LuceneBatchInserterIndexProviderNewImpl; -import org.neo4j.index.impl.lucene.LuceneIndexImplementation; -import org.neo4j.index.impl.lucene.MyStandardAnalyzer; +import org.neo4j.index.lucene.legacy.LuceneBatchInserterIndexProviderNewImpl; +import org.neo4j.index.lucene.legacy.LuceneIndexImplementation; +import org.neo4j.index.lucene.legacy.MyStandardAnalyzer; import org.neo4j.index.lucene.ValueContext; import org.neo4j.index.lucene.unsafe.batchinsert.LuceneBatchInserterIndexProvider; import org.neo4j.kernel.extension.KernelExtensionFactory; @@ -68,8 +68,8 @@ import static org.neo4j.helpers.collection.MapUtil.map; import static org.neo4j.helpers.collection.MapUtil.stringMap; import static org.neo4j.index.Neo4jTestCase.assertContains; -import static org.neo4j.index.impl.lucene.Contains.contains; -import static org.neo4j.index.impl.lucene.LuceneIndexImplementation.EXACT_CONFIG; +import static org.neo4j.index.lucene.legacy.Contains.contains; +import static org.neo4j.index.lucene.legacy.LuceneIndexImplementation.EXACT_CONFIG; import static org.neo4j.index.lucene.ValueContext.numeric; public class TestLuceneBatchInsert