From 1458628fa4214b93218cf0e64452b04b269a0ea1 Mon Sep 17 00:00:00 2001 From: Andrew Prudhomme Date: Fri, 4 Oct 2024 13:44:32 -0700 Subject: [PATCH] Remove luceneserver from the package path of the server --- .../analysis/AnalysisComponent.java | 2 +- .../analysis/AnalysisProvider.java | 2 +- .../analysis/AnalyzerCreator.java | 2 +- .../analysis/MappingV2CharFilterFactory.java | 2 +- .../analysis/NrtsearchSynonymParser.java | 2 +- .../analysis/PosIncGapAnalyzerWrapper.java | 2 +- .../analysis/SynonymV2GraphFilterFactory.java | 2 +- .../{luceneserver => }/codec/ServerCodec.java | 12 +- .../concurrent/ThreadPoolExecutorFactory.java | 2 +- .../config/LuceneServerConfiguration.java | 2 +- .../config/ThreadPoolConfiguration.java | 2 +- .../request/CustomRequestProcessor.java | 2 +- .../request/DuplicateRouteException.java | 2 +- .../request/RouteNotFoundException.java | 2 +- .../doc/DefaultSharedDocContext.java | 2 +- .../{luceneserver => }/doc/DocLookup.java | 4 +- .../doc/LoadedDocValues.java | 8 +- .../doc/SegmentDocLookup.java | 6 +- .../doc/SharedDocContext.java | 2 +- .../facet/DrillSidewaysImpl.java | 28 ++--- .../facet/FacetTopDocs.java | 10 +- .../facet/FilteredSSDVFacetCounts.java | 2 +- .../field/AtomFieldDef.java | 6 +- .../field/BindingValuesSources.java | 2 +- .../field/BooleanFieldDef.java | 8 +- .../field/ContextSuggestFieldDef.java | 6 +- .../field/DateTimeFieldDef.java | 10 +- .../field/DoubleFieldDef.java | 4 +- .../{luceneserver => }/field/FieldDef.java | 2 +- .../field/FieldDefBindings.java | 4 +- .../field/FieldDefCreator.java | 2 +- .../field/FieldDefProvider.java | 2 +- .../field/FieldWithData.java | 2 +- .../field/FloatFieldDef.java | 4 +- .../{luceneserver => }/field/IdFieldDef.java | 6 +- .../field/IndexableFieldDef.java | 10 +- .../{luceneserver => }/field/IntFieldDef.java | 4 +- .../field/LatLonFieldDef.java | 14 +-- .../field/LongFieldDef.java | 4 +- .../field/NumberFieldDef.java | 34 +++--- .../field/ObjectFieldDef.java | 8 +- .../field/PolygonfieldDef.java | 15 ++- .../field/RuntimeFieldDef.java | 6 +- .../field/TextBaseFieldDef.java | 18 +-- .../field/TextFieldDef.java | 2 +- .../field/VectorFieldDef.java | 20 +-- .../field/VirtualFieldDef.java | 6 +- .../field/properties/Bindable.java | 7 +- .../field/properties/GeoQueryable.java | 8 +- .../field/properties/GlobalOrdinalable.java | 9 +- .../field/properties/PolygonQueryable.java | 2 +- .../field/properties/RangeQueryable.java | 8 +- .../field/properties/Sortable.java | 9 +- .../field/properties/TermQueryable.java | 7 +- .../field/properties/VectorQueryable.java | 8 +- .../{luceneserver => }/geo/GeoPoint.java | 2 +- .../{luceneserver => }/geo/GeoUtils.java | 2 +- .../grpc/GrpcServerExecutorSupplier.java | 2 +- .../nrtsearch/server/grpc/LuceneServer.java | 114 +++++++++--------- .../server/grpc/ReplicationServerClient.java | 2 +- .../handler/AddDocumentHandler.java | 14 +-- .../handler/AddReplicaHandler.java | 10 +- .../handler/BackupWarmingQueriesHandler.java | 8 +- .../handler/CommitHandler.java | 6 +- .../handler/CopyFilesHandler.java | 12 +- .../handler/CreateIndexHandler.java | 4 +- .../handler/CreateSnapshotHandler.java | 8 +- .../handler/CustomHandler.java | 6 +- .../handler/DeleteAllDocumentsHandler.java | 8 +- .../handler/DeleteByQueryHandler.java | 10 +- .../handler/DeleteDocumentsHandler.java | 8 +- .../handler/DeleteIndexHandler.java | 6 +- .../handler/ForceMergeDeletesHandler.java | 8 +- .../handler/ForceMergeHandler.java | 8 +- .../GetAllSnapshotIndexGenHandler.java | 4 +- .../handler/GetNodesInfoHandler.java | 10 +- .../handler/GetStateHandler.java | 6 +- .../handler/GlobalStateHandler.java | 4 +- .../{luceneserver => }/handler/Handler.java | 4 +- .../handler/IndicesHandler.java | 6 +- .../handler/LiveSettingsHandler.java | 8 +- .../handler/LiveSettingsV2Handler.java | 6 +- .../handler/MetricsHandler.java | 2 +- .../handler/NewNRTPointHandler.java | 10 +- .../handler/ReadyHandler.java | 6 +- .../handler/RecvCopyStateHandler.java | 12 +- .../handler/RecvRawFileHandler.java | 10 +- .../handler/RecvRawFileV2Handler.java | 10 +- .../handler/RefreshHandler.java | 8 +- .../handler/RegisterFieldsHandler.java | 6 +- .../handler/ReleaseSnapshotHandler.java | 8 +- .../handler/ReloadStateHandler.java | 4 +- ...ReplicaCurrentSearchingVersionHandler.java | 8 +- .../handler/SearchHandler.java | 47 ++++---- .../handler/SearchV2Handler.java | 4 +- .../handler/SendRawFileHandler.java | 4 +- .../handler/SettingsHandler.java | 8 +- .../handler/SettingsV2Handler.java | 6 +- .../handler/StartIndexHandler.java | 4 +- .../handler/StartIndexV2Handler.java | 4 +- .../handler/StatsHandler.java | 8 +- .../handler/StatusHandler.java | 2 +- .../handler/StopIndexHandler.java | 4 +- .../handler/UpdateFieldsHandler.java | 6 +- .../handler/WriteNRTPointHandler.java | 12 +- .../highlights/HighlightFetchTask.java | 14 +-- .../highlights/HighlightSettings.java | 2 +- .../highlights/HighlightUtils.java | 9 +- .../highlights/Highlighter.java | 6 +- .../highlights/HighlighterService.java | 2 +- .../highlights/NRTFastVectorHighlighter.java | 6 +- .../index/BackendStateManager.java | 12 +- .../index/BucketedTieredMergePolicy.java | 2 +- .../index/DirectoryFactory.java | 2 +- .../index/FieldAndFacetState.java | 16 +-- .../index/FieldUpdateUtils.java | 16 +-- .../index/ImmutableIndexState.java | 20 +-- .../index/IndexAnalyzer.java | 8 +- .../index/IndexSimilarity.java | 6 +- .../{luceneserver => }/index/IndexState.java | 30 ++--- .../index/IndexStateManager.java | 4 +- .../index/NrtIndexWriter.java | 2 +- .../{luceneserver => }/index/ShardState.java | 20 +-- .../index/StartIndexProcessor.java | 8 +- .../innerhit/InnerHitContext.java | 20 +-- .../innerhit/InnerHitFetchTask.java | 10 +- .../logging/HitsLogger.java | 4 +- .../logging/HitsLoggerCreator.java | 2 +- .../logging/HitsLoggerFetchTask.java | 6 +- .../logging/HitsLoggerProvider.java | 4 +- .../server/monitoring/DirSizeCollector.java | 2 +- .../monitoring/MergeSchedulerCollector.java | 2 +- .../monitoring/QueryCacheCollector.java | 2 +- .../monitoring/SearchResponseCollector.java | 2 +- .../nrt/DefaultCopyThread.java | 2 +- .../nrt/NRTPrimaryNode.java | 6 +- .../nrt/NRTReplicaNode.java | 2 +- .../{luceneserver => }/nrt/NrtCopyThread.java | 2 +- .../nrt/NrtDataManager.java | 6 +- .../nrt/ProportionalCopyThread.java | 2 +- .../nrt/RefreshUploadFuture.java | 2 +- .../{luceneserver => }/nrt/SimpleCopyJob.java | 2 +- .../nrt/state/NrtFileMetaData.java | 4 +- .../nrt/state/NrtPointState.java | 2 +- .../server/plugins/AnalysisPlugin.java | 21 ++-- .../server/plugins/CollectorPlugin.java | 4 +- .../server/plugins/FetchTaskPlugin.java | 4 +- .../server/plugins/FieldTypePlugin.java | 4 +- .../server/plugins/HighlighterPlugin.java | 5 +- .../server/plugins/HitsLoggerPlugin.java | 4 +- .../server/plugins/RescorerPlugin.java | 4 +- .../server/plugins/ScriptPlugin.java | 9 +- .../server/plugins/SimilarityPlugin.java | 2 +- .../query/BlendedTermQuery.java | 2 +- .../query/MatchCrossFieldsQuery.java | 2 +- .../query/MatchPhrasePrefixQuery.java | 12 +- .../query/MatchQueryBuilder.java | 5 +- .../query/QueryNodeMapper.java | 37 +++--- .../{luceneserver => }/query/QueryUtils.java | 2 +- .../multifunction/DecayFilterFunction.java | 2 +- .../query/multifunction/DecayFunction.java | 2 +- .../ExponentialDecayFunction.java | 2 +- .../query/multifunction/FilterFunction.java | 16 +-- .../GeoPointDecayFilterFunction.java | 16 +-- .../multifunction/GuassianDecayFunction.java | 2 +- .../multifunction/LinearDecayFunction.java | 2 +- .../MultiFunctionScoreQuery.java | 10 +- .../multifunction/ScriptFilterFunction.java | 9 +- .../multifunction/WeightFilterFunction.java | 2 +- .../query/vector/NrtKnnByteVectorQuery.java | 2 +- .../query/vector/NrtKnnFloatVectorQuery.java | 2 +- .../query/vector/WithVectorTotalHits.java | 2 +- .../server/remote/RemoteBackend.java | 4 +- .../nrtsearch/server/remote/RemoteUtils.java | 4 +- .../nrtsearch/server/remote/s3/S3Backend.java | 6 +- .../rescore/QueryRescore.java | 2 +- .../rescore/RescoreContext.java | 4 +- .../rescore/RescoreOperation.java | 2 +- .../rescore/RescoreTask.java | 6 +- .../rescore/RescorerCreator.java | 2 +- .../rescore/RescorerProvider.java | 2 +- .../script/FacetScript.java | 8 +- .../script/RuntimeScript.java | 9 +- .../script/ScoreScript.java | 8 +- .../script/ScriptContext.java | 12 +- .../script/ScriptEngine.java | 2 +- .../script/ScriptService.java | 4 +- .../script/js/JsScriptBindings.java | 2 +- .../script/js/JsScriptEngine.java | 10 +- .../search/FetchTaskCreator.java | 14 +-- .../search/FetchTaskProvider.java | 9 +- .../{luceneserver => }/search/FetchTasks.java | 13 +- .../search/FieldFetchContext.java | 6 +- .../search/GlobalOrdinalLookup.java | 2 +- .../search/MyIndexSearcher.java | 2 +- .../search/SearchCollectorManager.java | 6 +- .../search/SearchContext.java | 16 +-- .../search/SearchCutoffWrapper.java | 2 +- .../search/SearchRequestProcessor.java | 68 +++++------ .../search/SearchStatsWrapper.java | 2 +- .../search/SearcherResult.java | 2 +- .../search/TerminateAfterWrapper.java | 2 +- .../search/cache/NrtQueryCache.java | 2 +- .../AdditionalCollectorManager.java | 4 +- .../search/collectors/CollectorCreator.java | 8 +- .../collectors/CollectorCreatorContext.java | 10 +- .../search/collectors/CollectorProvider.java | 2 +- .../search/collectors/DocCollector.java | 18 +-- .../search/collectors/HitCountCollector.java | 2 +- .../collectors/MyTopSuggestDocsCollector.java | 2 +- .../search/collectors/RelevanceCollector.java | 7 +- .../search/collectors/SortFieldCollector.java | 11 +- .../additional/CollectorStatsWrapper.java | 6 +- .../DoubleTermsCollectorManager.java | 14 +-- .../additional/FilterCollectorManager.java | 18 +-- .../FloatTermsCollectorManager.java | 14 +-- .../additional/IntTermsCollectorManager.java | 18 ++- .../additional/LeafValueProvider.java | 2 +- .../additional/LongTermsCollectorManager.java | 18 ++- .../additional/MaxCollectorManager.java | 10 +- .../additional/MinCollectorManager.java | 8 +- .../additional/NestedCollectorManagers.java | 6 +- .../OrdinalTermsCollectorManager.java | 16 +-- .../ScriptTermsCollectorManager.java | 16 +-- .../additional/ScriptValueProvider.java | 10 +- .../StringTermsCollectorManager.java | 18 ++- .../additional/TermsCollectorManager.java | 59 +++++---- .../additional/TopHitsCollectorManager.java | 20 +-- .../collectors/additional/ValueProvider.java | 2 +- .../VirtualTermsCollectorManager.java | 12 +- .../search/sort/SortContext.java | 8 +- .../search/sort/SortParser.java | 8 +- .../similarity/SimilarityCreator.java | 2 +- .../similarity/SimilarityProvider.java | 2 +- .../state/BackendGlobalState.java | 18 +-- .../{luceneserver => }/state/GlobalState.java | 8 +- .../{luceneserver => }/state/StateUtils.java | 2 +- .../state/backend/LocalStateBackend.java | 20 ++- .../state/backend/RemoteStateBackend.java | 23 ++-- .../state/backend/StateBackend.java | 2 +- .../suggest/ContextSuggestFieldData.java | 2 +- .../vector/ByteVectorType.java | 2 +- .../vector/FloatVectorType.java | 2 +- .../warming/ReservoirSampler.java | 2 +- .../{luceneserver => }/warming/Warmer.java | 8 +- .../warming/WarmerConfig.java | 2 +- .../nrt_utils/backup/RestoreCommand.java | 4 +- .../nrt_utils/backup/SnapshotCommand.java | 2 +- .../nrt_utils/cleanup/CleanupDataCommand.java | 2 +- .../nrt_utils/state/StateCommandUtils.java | 4 +- .../state/UpdateGlobalIndexStateCommand.java | 4 +- .../{luceneserver => }/ServerTestCase.java | 4 +- .../analysis/AnalyzerCreatorTest.java | 12 +- .../MappingV2CharFilterFactoryITest.java | 4 +- .../MappingV2CharFilterFactoryTest.java | 2 +- .../analysis/NrtsearchSynonymParserTest.java | 2 +- .../SynonymV2GraphFilterFactoryITest.java | 4 +- .../SynonymV2GraphFilterFactoryTest.java | 2 +- .../codec/ServerCodecTest.java | 14 +-- .../ThreadPoolExecutorFactoryTest.java | 2 +- .../config/ThreadPoolConfigurationTest.java | 2 +- .../request/CustomRequestProcessorTest.java | 2 +- .../request/CustomRequestTestPlugin.java | 2 +- .../custom/request/CustomRpcTest.java | 4 +- .../doc/DefaultSharedDocContextTest.java | 2 +- .../doc/ObjectStructDocValuesTest.java | 18 ++- .../doc/SharedDocContextTest.java | 12 +- .../doc/SingleBooleanTest.java | 24 ++-- .../doc/SingleDoubleTest.java | 24 ++-- .../doc/SingleFloatTest.java | 24 ++-- .../doc/SingleIntegerTest.java | 24 ++-- .../doc/SingleLongTest.java | 24 ++-- .../doc/SortedBooleansTest.java | 24 ++-- .../doc/SortedDoublesTest.java | 24 ++-- .../doc/SortedFloatsTest.java | 24 ++-- .../doc/SortedIntegersTest.java | 24 ++-- .../doc/SortedLongsTest.java | 24 ++-- .../{luceneserver => }/doc/TestUtils.java | 2 +- .../facet/DocValuesFacetsTest.java | 4 +- .../facet/EagerGlobalOrdinalsTest.java | 8 +- .../facet/FacetScriptFacetsTest.java | 14 +-- .../facet/FacetTopHitsTest.java | 4 +- .../facet/FilteredSSDVFacetCountsTest.java | 4 +- .../facet/NumberFieldFacetsTest.java | 4 +- .../facet/RuntimeScriptFacetsTest.java | 16 +-- .../facet/TextFieldFacetsTest.java | 4 +- .../facet/VirtualFieldFacetsTest.java | 6 +- .../field/AtomFieldDefTest.java | 4 +- .../field/AtomFieldTest.java | 4 +- .../field/BooleanFieldDefTest.java | 2 +- .../field/BooleanFieldTest.java | 4 +- .../field/ContextSuggestFieldDefTest.java | 6 +- .../field/DateTimeFieldDefTest.java | 4 +- .../field/DoubleFieldDefTest.java | 4 +- .../field/EagerFieldOrdinalTest.java | 8 +- .../field/FieldDefCreatorTest.java | 2 +- .../field/FloatFieldDefTest.java | 4 +- .../{luceneserver => }/field/IdFieldTest.java | 4 +- .../field/IntFieldDefTest.java | 4 +- .../field/LatLonFieldDefTest.java | 4 +- .../field/LongFieldDefTest.java | 4 +- .../field/MultivaluedObjectTest.java | 4 +- .../field/ObjectFieldDefTest.java | 4 +- .../field/PolygonFieldDefTest.java | 4 +- .../field/TestFieldDefTest.java | 4 +- .../field/TextFieldDefTest.java | 4 +- .../field/VectorFieldDefTest.java | 4 +- .../nrtsearch/server/grpc/CopyFileTest.java | 2 +- .../server/grpc/CustomFieldTypeTest.java | 8 +- .../server/grpc/DeadLineUtilsEnableTest.java | 2 +- .../server/grpc/ExistsQueryTest.java | 2 +- .../nrtsearch/server/grpc/GrpcServer.java | 2 +- .../grpc/GrpcServerExecutorSupplierTest.java | 2 +- .../nrtsearch/server/grpc/IndexStartTest.java | 2 +- .../server/grpc/LuceneServerTest.java | 4 +- ...TermQueryBehaviorWithTokenizationTest.java | 2 +- .../server/grpc/MergeBehaviorTests.java | 2 +- .../nrtsearch/server/grpc/MultiFieldTest.java | 2 +- .../grpc/MultiIndexAddDocumentsTest.java | 2 +- .../server/grpc/MultiSegmentTest.java | 2 +- .../server/grpc/NestedFieldTest.java | 2 +- .../grpc/ReplicationServerClientTest.java | 2 +- .../server/grpc/SearchStateTest.java | 2 +- .../nrtsearch/server/grpc/SortFieldTest.java | 2 +- .../nrtsearch/server/grpc/StartHitTest.java | 2 +- .../server/grpc/StateBackendServerTest.java | 4 +- .../nrtsearch/server/grpc/TestServer.java | 8 +- .../nrtsearch/server/grpc/TimeoutTest.java | 20 +-- .../server/grpc/TotalHitsThresholdTest.java | 2 +- .../server/grpc/VerifyIndexIdTest.java | 2 +- .../NRTFastVectorHighlighterTest.java | 4 +- .../index/BackendStateManagerTest.java | 14 +-- .../index/BucketedTieredMergePolicyTest.java | 4 +- .../index/DirectoryFactoryTest.java | 2 +- .../index/FieldUpdateUtilsTest.java | 30 ++--- .../index/ImmutableIndexStateTest.java | 22 ++-- .../innerhit/innerHitTest.java | 4 +- .../logging/HitsLoggerCreatorTest.java | 4 +- .../logging/HitsLoggerTest.java | 6 +- .../monitoring/DirSizeCollectorTest.java | 2 +- .../MergeSchedulerCollectorTest.java | 6 +- .../SearchResponseCollectorTest.java | 4 +- .../nrt/DefaultCopyThreadTest.java | 2 +- .../nrt/NrtDataManagerTest.java | 6 +- .../nrt/NrtReplicaNodeTest.java | 2 +- .../nrt/PrimaryNodeReferenceManagerTest.java | 2 +- .../nrt/ProportionalCopyThreadTest.java | 2 +- .../nrt/RefreshUploadFutureTest.java | 2 +- .../nrt/SimpleCopyJobTest.java | 4 +- .../nrt/state/NrtFileMetaDataTest.java | 2 +- .../nrt/state/NrtPointStateTest.java | 2 +- .../server/plugins/PluginS3DownloadTest.java | 2 + .../query/ConstantScoreQueryTest.java | 4 +- .../query/MatchCrossFieldsQueryTest.java | 4 +- .../query/MatchPhrasePrefixQueryTest.java | 4 +- .../query/MatchQueryBuilderTest.java | 2 +- .../MultiMatchPhrasePrefixQueryTest.java | 4 +- .../query/PrefixQueryTest.java | 6 +- .../query/QueryNodeMapperTest.java | 22 ++-- .../query/SpanQueryTest.java | 4 +- .../MultiFunctionScoreQueryTest.java | 6 +- .../server/remote/RemoteUtilsTest.java | 2 +- .../server/remote/s3/S3BackendTest.java | 4 +- .../rescore/RescorerCreatorTest.java | 2 +- .../rescore/RescorerTest.java | 8 +- .../script/ScoreScriptTest.java | 10 +- .../script/ScriptContextTest.java | 2 +- .../script/ScriptServiceTest.java | 2 +- .../script/js/JsScriptBindingsTest.java | 8 +- .../script/js/JsScriptEngineTest.java | 4 +- .../search/FetchTaskCreatorTest.java | 2 +- .../search/FetchTasksTest.java | 10 +- .../search/GlobalOrdinalLookupTest.java | 12 +- .../search/MyIndexSearcherTest.java | 10 +- .../MyIndexSearcherVirtualShardsTest.java | 6 +- .../search/SearchContextTest.java | 12 +- .../search/SearchCutoffWrapperTest.java | 4 +- .../search/SearchStatsWrapperTest.java | 4 +- .../search/TerminateAfterWrapperTest.java | 6 +- .../collectors/CollectorCreatorTest.java | 2 +- .../search/collectors/CollectorTest.java | 12 +- .../search/collectors/DocCollectorTest.java | 12 +- .../MyTopSuggestDocsCollectorTest.java | 2 +- .../additional/CollectorStatsWrapperTest.java | 12 +- .../DoubleTermsCollectorManagerTest.java | 2 +- .../FilterCollectorManagerTest.java | 6 +- .../FloatTermsCollectorManagerTest.java | 2 +- .../IntTermsCollectorManagerTest.java | 2 +- .../LongTermsCollectorManagerTest.java | 2 +- .../additional/MaxCollectorManagerTest.java | 2 +- .../additional/MinCollectorManagerTest.java | 2 +- .../additional/NestedCollectionTest.java | 6 +- .../additional/NestedCollectorOrderTest.java | 6 +- .../OrdinalTermsCollectorManagerTest.java | 2 +- .../ScriptTermsCollectorManagerTest.java | 12 +- .../StringTermsCollectorManagerTest.java | 2 +- .../additional/TermsCollectorManagerTest.java | 10 +- .../TermsCollectorManagerTestsBase.java | 6 +- .../TopHitsCollectorManagerTest.java | 6 +- .../VirtualTermsCollectorManagerTest.java | 2 +- .../similarity/SimilarityCreatorTest.java | 2 +- .../similarity/SimilarityTest.java | 4 +- .../state/BackendGlobalStateTest.java | 22 ++-- .../state/GlobalStateTest.java | 2 +- .../state/StateUtilsTest.java | 2 +- .../state/backend/LocalStateBackendTest.java | 8 +- .../state/backend/RemoteStateBackendTest.java | 8 +- .../server/utils/MinMaxUtilTest.java | 4 +- .../vector/FloatVectorTypeTest.java | 2 +- .../warming/ReservoirSamplerTest.java | 2 +- .../warming/WarmerTest.java | 6 +- .../nrtsearch/test_utils/NrtsearchTest.java | 7 +- .../tools/cli/CreateIndexCommandTest.java | 8 +- .../tools/cli/IndicesCommandTest.java | 2 +- .../backup/SnapshotRestoreCommandTest.java | 6 +- .../cleanup/CleanupDataCommandTest.java | 2 +- .../state/GetRemoteStateCommandTest.java | 6 +- .../state/GetResourceVersionCommandTest.java | 2 +- .../state/ListResourceVersionsTest.java | 2 +- .../state/PutRemoteStateCommandTest.java | 6 +- .../state/SetResourceVersionCommandTest.java | 2 +- .../state/StateCommandUtilsTest.java | 6 +- 422 files changed, 1500 insertions(+), 1551 deletions(-) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/AnalysisComponent.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/AnalysisProvider.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/AnalyzerCreator.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/MappingV2CharFilterFactory.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/NrtsearchSynonymParser.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/PosIncGapAnalyzerWrapper.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/SynonymV2GraphFilterFactory.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/codec/ServerCodec.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/concurrent/ThreadPoolExecutorFactory.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/custom/request/CustomRequestProcessor.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/custom/request/DuplicateRouteException.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/custom/request/RouteNotFoundException.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/DefaultSharedDocContext.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/DocLookup.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/LoadedDocValues.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SegmentDocLookup.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SharedDocContext.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/DrillSidewaysImpl.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/FacetTopDocs.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/FilteredSSDVFacetCounts.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/AtomFieldDef.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/BindingValuesSources.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/BooleanFieldDef.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/ContextSuggestFieldDef.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/DateTimeFieldDef.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/DoubleFieldDef.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FieldDef.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FieldDefBindings.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FieldDefCreator.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FieldDefProvider.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FieldWithData.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FloatFieldDef.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/IdFieldDef.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/IndexableFieldDef.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/IntFieldDef.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/LatLonFieldDef.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/LongFieldDef.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/NumberFieldDef.java (86%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/ObjectFieldDef.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/PolygonfieldDef.java (86%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/RuntimeFieldDef.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/TextBaseFieldDef.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/TextFieldDef.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/VectorFieldDef.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/VirtualFieldDef.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/Bindable.java (84%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/GeoQueryable.java (88%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/GlobalOrdinalable.java (83%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/PolygonQueryable.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/RangeQueryable.java (82%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/Sortable.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/TermQueryable.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/field/properties/VectorQueryable.java (82%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/geo/GeoPoint.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/geo/GeoUtils.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/AddDocumentHandler.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/AddReplicaHandler.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/BackupWarmingQueriesHandler.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/CommitHandler.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/CopyFilesHandler.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/CreateIndexHandler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/CreateSnapshotHandler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/CustomHandler.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/DeleteAllDocumentsHandler.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/DeleteByQueryHandler.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/DeleteDocumentsHandler.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/DeleteIndexHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/ForceMergeDeletesHandler.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/ForceMergeHandler.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/GetAllSnapshotIndexGenHandler.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/GetNodesInfoHandler.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/GetStateHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/GlobalStateHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/Handler.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/IndicesHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/LiveSettingsHandler.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/LiveSettingsV2Handler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/MetricsHandler.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/NewNRTPointHandler.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/ReadyHandler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/RecvCopyStateHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/RecvRawFileHandler.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/RecvRawFileV2Handler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/RefreshHandler.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/RegisterFieldsHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/ReleaseSnapshotHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/ReloadStateHandler.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/ReplicaCurrentSearchingVersionHandler.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/SearchHandler.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/SearchV2Handler.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/SendRawFileHandler.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/SettingsHandler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/SettingsV2Handler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/StartIndexHandler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/StartIndexV2Handler.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/StatsHandler.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/StatusHandler.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/StopIndexHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/UpdateFieldsHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/handler/WriteNRTPointHandler.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/HighlightFetchTask.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/HighlightSettings.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/HighlightUtils.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/Highlighter.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/HighlighterService.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/NRTFastVectorHighlighter.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/BackendStateManager.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/BucketedTieredMergePolicy.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/DirectoryFactory.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/FieldAndFacetState.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/FieldUpdateUtils.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/ImmutableIndexState.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/IndexAnalyzer.java (88%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/IndexSimilarity.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/IndexState.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/IndexStateManager.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/NrtIndexWriter.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/ShardState.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/index/StartIndexProcessor.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/innerhit/InnerHitContext.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/innerhit/InnerHitFetchTask.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/logging/HitsLogger.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/logging/HitsLoggerCreator.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/logging/HitsLoggerFetchTask.java (88%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/logging/HitsLoggerProvider.java (88%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/DefaultCopyThread.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/NRTPrimaryNode.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/NRTReplicaNode.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/NrtCopyThread.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/NrtDataManager.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/ProportionalCopyThread.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/RefreshUploadFuture.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/SimpleCopyJob.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/state/NrtFileMetaData.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/state/NrtPointState.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/BlendedTermQuery.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MatchCrossFieldsQuery.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MatchPhrasePrefixQuery.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MatchQueryBuilder.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/QueryNodeMapper.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/QueryUtils.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/DecayFilterFunction.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/DecayFunction.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/ExponentialDecayFunction.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/FilterFunction.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/GeoPointDecayFilterFunction.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/GuassianDecayFunction.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/LinearDecayFunction.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/MultiFunctionScoreQuery.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/ScriptFilterFunction.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/WeightFilterFunction.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/vector/NrtKnnByteVectorQuery.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/vector/NrtKnnFloatVectorQuery.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/query/vector/WithVectorTotalHits.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/QueryRescore.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescoreContext.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescoreOperation.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescoreTask.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescorerCreator.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescorerProvider.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/FacetScript.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/RuntimeScript.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScoreScript.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScriptContext.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScriptEngine.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScriptService.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/js/JsScriptBindings.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/script/js/JsScriptEngine.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/FetchTaskCreator.java (85%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/FetchTaskProvider.java (71%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/FetchTasks.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/FieldFetchContext.java (86%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/GlobalOrdinalLookup.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/MyIndexSearcher.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchCollectorManager.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchContext.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchCutoffWrapper.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchRequestProcessor.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchStatsWrapper.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearcherResult.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/TerminateAfterWrapper.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/cache/NrtQueryCache.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/AdditionalCollectorManager.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/CollectorCreator.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/CollectorCreatorContext.java (88%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/CollectorProvider.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/DocCollector.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/HitCountCollector.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/MyTopSuggestDocsCollector.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/RelevanceCollector.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/SortFieldCollector.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/CollectorStatsWrapper.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/DoubleTermsCollectorManager.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/FilterCollectorManager.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/FloatTermsCollectorManager.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/IntTermsCollectorManager.java (86%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/LeafValueProvider.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/LongTermsCollectorManager.java (86%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/MaxCollectorManager.java (89%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/MinCollectorManager.java (92%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/NestedCollectorManagers.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/OrdinalTermsCollectorManager.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/ScriptTermsCollectorManager.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/ScriptValueProvider.java (88%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/StringTermsCollectorManager.java (87%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/TermsCollectorManager.java (94%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/TopHitsCollectorManager.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/ValueProvider.java (93%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/VirtualTermsCollectorManager.java (91%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/sort/SortContext.java (90%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/search/sort/SortParser.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/similarity/SimilarityCreator.java (98%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/similarity/SimilarityProvider.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/state/BackendGlobalState.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/state/GlobalState.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/state/StateUtils.java (99%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/state/backend/LocalStateBackend.java (84%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/state/backend/RemoteStateBackend.java (87%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/state/backend/StateBackend.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/suggest/ContextSuggestFieldData.java (95%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/vector/ByteVectorType.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/vector/FloatVectorType.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/warming/ReservoirSampler.java (97%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/warming/Warmer.java (96%) rename src/main/java/com/yelp/nrtsearch/server/{luceneserver => }/warming/WarmerConfig.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/ServerTestCase.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/AnalyzerCreatorTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/MappingV2CharFilterFactoryITest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/MappingV2CharFilterFactoryTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/NrtsearchSynonymParserTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/SynonymV2GraphFilterFactoryITest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/analysis/SynonymV2GraphFilterFactoryTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/codec/ServerCodecTest.java (94%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/concurrent/ThreadPoolExecutorFactoryTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/custom/request/CustomRequestProcessorTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/custom/request/CustomRequestTestPlugin.java (94%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/custom/request/CustomRpcTest.java (93%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/DefaultSharedDocContextTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/ObjectStructDocValuesTest.java (90%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SharedDocContextTest.java (94%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SingleBooleanTest.java (78%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SingleDoubleTest.java (81%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SingleFloatTest.java (82%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SingleIntegerTest.java (79%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SingleLongTest.java (78%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SortedBooleansTest.java (80%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SortedDoublesTest.java (85%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SortedFloatsTest.java (85%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SortedIntegersTest.java (81%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/SortedLongsTest.java (80%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/doc/TestUtils.java (95%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/DocValuesFacetsTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/EagerGlobalOrdinalsTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/FacetScriptFacetsTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/FacetTopHitsTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/FilteredSSDVFacetCountsTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/NumberFieldFacetsTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/RuntimeScriptFacetsTest.java (95%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/TextFieldFacetsTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/facet/VirtualFieldFacetsTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/AtomFieldDefTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/AtomFieldTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/BooleanFieldDefTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/BooleanFieldTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/ContextSuggestFieldDefTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/DateTimeFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/DoubleFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/EagerFieldOrdinalTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FieldDefCreatorTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/FloatFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/IdFieldTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/IntFieldDefTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/LatLonFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/LongFieldDefTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/MultivaluedObjectTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/ObjectFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/PolygonFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/TestFieldDefTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/TextFieldDefTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/field/VectorFieldDefTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/highlights/NRTFastVectorHighlighterTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/index/BackendStateManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/index/BucketedTieredMergePolicyTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/index/DirectoryFactoryTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/index/FieldUpdateUtilsTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/index/ImmutableIndexStateTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/innerhit/innerHitTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/logging/HitsLoggerCreatorTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/logging/HitsLoggerTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/DefaultCopyThreadTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/NrtDataManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/NrtReplicaNodeTest.java (95%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/PrimaryNodeReferenceManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/ProportionalCopyThreadTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/RefreshUploadFutureTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/SimpleCopyJobTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/state/NrtFileMetaDataTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/nrt/state/NrtPointStateTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/ConstantScoreQueryTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MatchCrossFieldsQueryTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MatchPhrasePrefixQueryTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MatchQueryBuilderTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/MultiMatchPhrasePrefixQueryTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/PrefixQueryTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/QueryNodeMapperTest.java (91%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/SpanQueryTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/query/multifunction/MultiFunctionScoreQueryTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescorerCreatorTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/rescore/RescorerTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScoreScriptTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScriptContextTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/script/ScriptServiceTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/script/js/JsScriptBindingsTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/script/js/JsScriptEngineTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/FetchTaskCreatorTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/FetchTasksTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/GlobalOrdinalLookupTest.java (94%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/MyIndexSearcherTest.java (95%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/MyIndexSearcherVirtualShardsTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchContextTest.java (93%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchCutoffWrapperTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/SearchStatsWrapperTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/TerminateAfterWrapperTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/CollectorCreatorTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/CollectorTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/DocCollectorTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/MyTopSuggestDocsCollectorTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/CollectorStatsWrapperTest.java (95%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/DoubleTermsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/FilterCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/FloatTermsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/IntTermsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/LongTermsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/MaxCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/MinCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/NestedCollectionTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/NestedCollectorOrderTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/OrdinalTermsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/ScriptTermsCollectorManagerTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/StringTermsCollectorManagerTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/TermsCollectorManagerTest.java (91%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/TermsCollectorManagerTestsBase.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/TopHitsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/search/collectors/additional/VirtualTermsCollectorManagerTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/similarity/SimilarityCreatorTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/similarity/SimilarityTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/state/BackendGlobalStateTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/state/GlobalStateTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/state/StateUtilsTest.java (99%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/state/backend/LocalStateBackendTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/state/backend/RemoteStateBackendTest.java (98%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/vector/FloatVectorTypeTest.java (97%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/warming/ReservoirSamplerTest.java (96%) rename src/test/java/com/yelp/nrtsearch/server/{luceneserver => }/warming/WarmerTest.java (97%) diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalysisComponent.java b/src/main/java/com/yelp/nrtsearch/server/analysis/AnalysisComponent.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalysisComponent.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/AnalysisComponent.java index d6d4a139c..eea1b5187 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalysisComponent.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/AnalysisComponent.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalysisProvider.java b/src/main/java/com/yelp/nrtsearch/server/analysis/AnalysisProvider.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalysisProvider.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/AnalysisProvider.java index c6a9d330d..f1bdc9258 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalysisProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/AnalysisProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; /** * Interface for creating object from the given analysis properties. Currently only passes the name diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalyzerCreator.java b/src/main/java/com/yelp/nrtsearch/server/analysis/AnalyzerCreator.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalyzerCreator.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/AnalyzerCreator.java index 59d4146ec..279201275 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalyzerCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/AnalyzerCreator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.ConditionalTokenFilter; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactory.java b/src/main/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactory.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactory.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactory.java index 2df91e521..424a151b2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactory.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import java.io.Reader; import java.util.Arrays; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/NrtsearchSynonymParser.java b/src/main/java/com/yelp/nrtsearch/server/analysis/NrtsearchSynonymParser.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/NrtsearchSynonymParser.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/NrtsearchSynonymParser.java index f07d9e136..085c3ac5e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/NrtsearchSynonymParser.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/NrtsearchSynonymParser.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import java.io.BufferedReader; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/PosIncGapAnalyzerWrapper.java b/src/main/java/com/yelp/nrtsearch/server/analysis/PosIncGapAnalyzerWrapper.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/PosIncGapAnalyzerWrapper.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/PosIncGapAnalyzerWrapper.java index 2b80d6a92..56ea71ea0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/PosIncGapAnalyzerWrapper.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/PosIncGapAnalyzerWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.AnalyzerWrapper; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactory.java b/src/main/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactory.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactory.java rename to src/main/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactory.java index 0705477c8..a316fb9f7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactory.java +++ b/src/main/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import java.io.IOException; import java.io.StringReader; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/codec/ServerCodec.java b/src/main/java/com/yelp/nrtsearch/server/codec/ServerCodec.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/codec/ServerCodec.java rename to src/main/java/com/yelp/nrtsearch/server/codec/ServerCodec.java index 75ce11a66..e3e5af465 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/codec/ServerCodec.java +++ b/src/main/java/com/yelp/nrtsearch/server/codec/ServerCodec.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.codec; +package com.yelp.nrtsearch.server.codec; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VectorFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.VectorFieldDef; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.codecs.KnnVectorsFormat; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/concurrent/ThreadPoolExecutorFactory.java b/src/main/java/com/yelp/nrtsearch/server/concurrent/ThreadPoolExecutorFactory.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/concurrent/ThreadPoolExecutorFactory.java rename to src/main/java/com/yelp/nrtsearch/server/concurrent/ThreadPoolExecutorFactory.java index b81c2aee3..747d1afe7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/concurrent/ThreadPoolExecutorFactory.java +++ b/src/main/java/com/yelp/nrtsearch/server/concurrent/ThreadPoolExecutorFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.concurrent; +package com.yelp.nrtsearch.server.concurrent; import com.yelp.nrtsearch.server.config.ThreadPoolConfiguration; import com.yelp.nrtsearch.server.monitoring.ThreadPoolCollector; diff --git a/src/main/java/com/yelp/nrtsearch/server/config/LuceneServerConfiguration.java b/src/main/java/com/yelp/nrtsearch/server/config/LuceneServerConfiguration.java index db766ee0c..c008c3fa6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/config/LuceneServerConfiguration.java +++ b/src/main/java/com/yelp/nrtsearch/server/config/LuceneServerConfiguration.java @@ -19,8 +19,8 @@ import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.warming.WarmerConfig; import com.yelp.nrtsearch.server.utils.JsonUtils; +import com.yelp.nrtsearch.server.warming.WarmerConfig; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; diff --git a/src/main/java/com/yelp/nrtsearch/server/config/ThreadPoolConfiguration.java b/src/main/java/com/yelp/nrtsearch/server/config/ThreadPoolConfiguration.java index 458e47d19..a2d85a10a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/config/ThreadPoolConfiguration.java +++ b/src/main/java/com/yelp/nrtsearch/server/config/ThreadPoolConfiguration.java @@ -16,7 +16,7 @@ package com.yelp.nrtsearch.server.config; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import com.yelp.nrtsearch.server.utils.JsonUtils; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestProcessor.java b/src/main/java/com/yelp/nrtsearch/server/custom/request/CustomRequestProcessor.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestProcessor.java rename to src/main/java/com/yelp/nrtsearch/server/custom/request/CustomRequestProcessor.java index 060a5f4ee..3a3c4b642 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestProcessor.java +++ b/src/main/java/com/yelp/nrtsearch/server/custom/request/CustomRequestProcessor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.custom.request; +package com.yelp.nrtsearch.server.custom.request; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.CustomRequest; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/DuplicateRouteException.java b/src/main/java/com/yelp/nrtsearch/server/custom/request/DuplicateRouteException.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/DuplicateRouteException.java rename to src/main/java/com/yelp/nrtsearch/server/custom/request/DuplicateRouteException.java index f5d865579..a574a051b 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/DuplicateRouteException.java +++ b/src/main/java/com/yelp/nrtsearch/server/custom/request/DuplicateRouteException.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.custom.request; +package com.yelp.nrtsearch.server.custom.request; import java.text.MessageFormat; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/RouteNotFoundException.java b/src/main/java/com/yelp/nrtsearch/server/custom/request/RouteNotFoundException.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/RouteNotFoundException.java rename to src/main/java/com/yelp/nrtsearch/server/custom/request/RouteNotFoundException.java index 73d0373de..48384fc6d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/custom/request/RouteNotFoundException.java +++ b/src/main/java/com/yelp/nrtsearch/server/custom/request/RouteNotFoundException.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.custom.request; +package com.yelp.nrtsearch.server.custom.request; import java.text.MessageFormat; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/DefaultSharedDocContext.java b/src/main/java/com/yelp/nrtsearch/server/doc/DefaultSharedDocContext.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/DefaultSharedDocContext.java rename to src/main/java/com/yelp/nrtsearch/server/doc/DefaultSharedDocContext.java index 1fcf8b7ff..70e72e20a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/DefaultSharedDocContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/doc/DefaultSharedDocContext.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/DocLookup.java b/src/main/java/com/yelp/nrtsearch/server/doc/DocLookup.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/DocLookup.java rename to src/main/java/com/yelp/nrtsearch/server/doc/DocLookup.java index bc754e29a..b3f7f3a63 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/DocLookup.java +++ b/src/main/java/com/yelp/nrtsearch/server/doc/DocLookup.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; import java.util.function.Function; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/LoadedDocValues.java b/src/main/java/com/yelp/nrtsearch/server/doc/LoadedDocValues.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/LoadedDocValues.java rename to src/main/java/com/yelp/nrtsearch/server/doc/LoadedDocValues.java index 4b21d1b39..048926251 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/LoadedDocValues.java +++ b/src/main/java/com/yelp/nrtsearch/server/doc/LoadedDocValues.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; import static org.apache.lucene.util.ArrayUtil.oversize; @@ -21,13 +21,13 @@ import com.google.protobuf.ListValue; import com.google.protobuf.Struct; import com.google.type.LatLng; +import com.yelp.nrtsearch.server.geo.GeoPoint; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue.Vector; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue.Vector.Builder; -import com.yelp.nrtsearch.server.luceneserver.geo.GeoPoint; -import com.yelp.nrtsearch.server.luceneserver.vector.ByteVectorType; -import com.yelp.nrtsearch.server.luceneserver.vector.FloatVectorType; +import com.yelp.nrtsearch.server.vector.ByteVectorType; +import com.yelp.nrtsearch.server.vector.FloatVectorType; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.FloatBuffer; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/SegmentDocLookup.java b/src/main/java/com/yelp/nrtsearch/server/doc/SegmentDocLookup.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/SegmentDocLookup.java rename to src/main/java/com/yelp/nrtsearch/server/doc/SegmentDocLookup.java index 767aac976..4088243ad 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/SegmentDocLookup.java +++ b/src/main/java/com/yelp/nrtsearch/server/doc/SegmentDocLookup.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import java.io.IOException; import java.util.Collection; import java.util.HashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/SharedDocContext.java b/src/main/java/com/yelp/nrtsearch/server/doc/SharedDocContext.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/SharedDocContext.java rename to src/main/java/com/yelp/nrtsearch/server/doc/SharedDocContext.java index 427d69095..a8eaed1a4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/doc/SharedDocContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/doc/SharedDocContext.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/DrillSidewaysImpl.java b/src/main/java/com/yelp/nrtsearch/server/facet/DrillSidewaysImpl.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/DrillSidewaysImpl.java rename to src/main/java/com/yelp/nrtsearch/server/facet/DrillSidewaysImpl.java index c2033efe7..85db9516c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/DrillSidewaysImpl.java +++ b/src/main/java/com/yelp/nrtsearch/server/facet/DrillSidewaysImpl.java @@ -13,25 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import com.google.protobuf.ProtocolStringList; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.DoubleFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FloatFieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.IntFieldDef; +import com.yelp.nrtsearch.server.field.LongFieldDef; +import com.yelp.nrtsearch.server.field.RuntimeFieldDef; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.NumericRangeType; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.DoubleFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FloatFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IntFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.LongFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.RuntimeFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.script.FacetScript; +import com.yelp.nrtsearch.server.script.ScriptService; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetTopDocs.java b/src/main/java/com/yelp/nrtsearch/server/facet/FacetTopDocs.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetTopDocs.java rename to src/main/java/com/yelp/nrtsearch/server/facet/FacetTopDocs.java index a6abe7709..e38a10322 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetTopDocs.java +++ b/src/main/java/com/yelp/nrtsearch/server/facet/FacetTopDocs.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexState; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/FilteredSSDVFacetCounts.java b/src/main/java/com/yelp/nrtsearch/server/facet/FilteredSSDVFacetCounts.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/FilteredSSDVFacetCounts.java rename to src/main/java/com/yelp/nrtsearch/server/facet/FilteredSSDVFacetCounts.java index 755075542..954af5a74 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/facet/FilteredSSDVFacetCounts.java +++ b/src/main/java/com/yelp/nrtsearch/server/facet/FilteredSSDVFacetCounts.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import java.io.IOException; import java.util.Arrays; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/AtomFieldDef.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/AtomFieldDef.java index 1dcc62c09..8a74766d9 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/AtomFieldDef.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; +import com.yelp.nrtsearch.server.field.properties.Sortable; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.core.KeywordAnalyzer; import org.apache.lucene.document.FieldType; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/BindingValuesSources.java b/src/main/java/com/yelp/nrtsearch/server/field/BindingValuesSources.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/BindingValuesSources.java rename to src/main/java/com/yelp/nrtsearch/server/field/BindingValuesSources.java index 8e326b4fb..a3a208db6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/BindingValuesSources.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/BindingValuesSources.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import java.io.IOException; import java.util.Objects; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/BooleanFieldDef.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/BooleanFieldDef.java index 230f1c812..441514d82 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/BooleanFieldDef.java @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.TermQueryable; import com.yelp.nrtsearch.server.grpc.FacetType; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermInSetQuery; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.properties.TermQueryable; import java.io.IOException; import java.util.List; import org.apache.lucene.document.*; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/ContextSuggestFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/ContextSuggestFieldDef.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/ContextSuggestFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/ContextSuggestFieldDef.java index 68ee69ae0..1aec3ca40 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/ContextSuggestFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/ContextSuggestFieldDef.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.yelp.nrtsearch.server.analysis.AnalyzerCreator; import com.yelp.nrtsearch.server.grpc.Field; -import com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator; -import com.yelp.nrtsearch.server.luceneserver.suggest.ContextSuggestFieldData; +import com.yelp.nrtsearch.server.suggest.ContextSuggestFieldData; import java.util.List; import java.util.Optional; import org.apache.lucene.analysis.Analyzer; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/DateTimeFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/DateTimeFieldDef.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/DateTimeFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/DateTimeFieldDef.java index e21c69c89..4787757a1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/DateTimeFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/DateTimeFieldDef.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.RangeQueryable; +import com.yelp.nrtsearch.server.field.properties.Sortable; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.Field; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.properties.RangeQueryable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; import java.io.IOException; import java.time.Instant; import java.time.LocalDateTime; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/DoubleFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/DoubleFieldDef.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/DoubleFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/DoubleFieldDef.java index 165ab8180..11af60de2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/DoubleFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/DoubleFieldDef.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; import java.util.ArrayList; import java.util.List; import java.util.function.LongToDoubleFunction; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/FieldDef.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/FieldDef.java index b974efe1b..066b0ef66 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/FieldDef.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import java.io.Closeable; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefBindings.java b/src/main/java/com/yelp/nrtsearch/server/field/FieldDefBindings.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefBindings.java rename to src/main/java/com/yelp/nrtsearch/server/field/FieldDefBindings.java index 4a5dc37d7..11d5100fe 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefBindings.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/FieldDefBindings.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Bindable; +import com.yelp.nrtsearch.server.field.properties.Bindable; import java.util.function.Function; import org.apache.lucene.expressions.Bindings; import org.apache.lucene.expressions.js.VariableContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefCreator.java b/src/main/java/com/yelp/nrtsearch/server/field/FieldDefCreator.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefCreator.java rename to src/main/java/com/yelp/nrtsearch/server/field/FieldDefCreator.java index 13bb07d8f..d842c8e90 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/FieldDefCreator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.Field; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefProvider.java b/src/main/java/com/yelp/nrtsearch/server/field/FieldDefProvider.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefProvider.java rename to src/main/java/com/yelp/nrtsearch/server/field/FieldDefProvider.java index d8690b49f..6818a1efc 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/FieldDefProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import com.yelp.nrtsearch.server.grpc.Field; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldWithData.java b/src/main/java/com/yelp/nrtsearch/server/field/FieldWithData.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldWithData.java rename to src/main/java/com/yelp/nrtsearch/server/field/FieldWithData.java index 9eb3883a0..93a23e6d0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FieldWithData.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/FieldWithData.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FloatFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/FloatFieldDef.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FloatFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/FloatFieldDef.java index da3d234ff..f581799b2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/FloatFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/FloatFieldDef.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; import java.util.ArrayList; import java.util.List; import java.util.function.LongToDoubleFunction; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IdFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/IdFieldDef.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IdFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/IdFieldDef.java index 456197e8f..1affb74ab 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IdFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/IdFieldDef.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.TermQueryable; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.properties.TermQueryable; import java.io.IOException; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IndexableFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/IndexableFieldDef.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IndexableFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/IndexableFieldDef.java index 3b7f29633..2acb097f7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IndexableFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/IndexableFieldDef.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.handler.AddDocumentHandler; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.handler.AddDocumentHandler; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; import com.yelp.nrtsearch.server.utils.StructValueTransformer; import java.io.IOException; import java.util.Collections; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IntFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/IntFieldDef.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IntFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/IntFieldDef.java index 5ebab6862..0405fd28f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/IntFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/IntFieldDef.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; import java.util.ArrayList; import java.util.List; import java.util.function.LongToDoubleFunction; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/LatLonFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/LatLonFieldDef.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/LatLonFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/LatLonFieldDef.java index f87a837df..d1db27954 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/LatLonFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/LatLonFieldDef.java @@ -13,10 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.GeoQueryable; +import com.yelp.nrtsearch.server.field.properties.Sortable; +import com.yelp.nrtsearch.server.geo.GeoPoint; +import com.yelp.nrtsearch.server.geo.GeoUtils; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.GeoBoundingBoxQuery; import com.yelp.nrtsearch.server.grpc.GeoPolygonQuery; @@ -25,11 +30,6 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.CompositeFieldValue; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GeoQueryable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; -import com.yelp.nrtsearch.server.luceneserver.geo.GeoPoint; -import com.yelp.nrtsearch.server.luceneserver.geo.GeoUtils; import java.io.IOException; import java.util.List; import java.util.function.BiFunction; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/LongFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/LongFieldDef.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/LongFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/LongFieldDef.java index 9a7ed884a..775a98457 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/LongFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/LongFieldDef.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; import java.util.ArrayList; import java.util.List; import java.util.function.LongToDoubleFunction; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/NumberFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/NumberFieldDef.java similarity index 86% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/NumberFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/NumberFieldDef.java index 601b3e8fb..4b7bbe5a6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/NumberFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/NumberFieldDef.java @@ -13,24 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.Bindable; +import com.yelp.nrtsearch.server.field.properties.RangeQueryable; +import com.yelp.nrtsearch.server.field.properties.Sortable; +import com.yelp.nrtsearch.server.field.properties.TermQueryable; import com.yelp.nrtsearch.server.grpc.FacetType; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.BindingValuesSources.NumericDecodedValuesSource; -import com.yelp.nrtsearch.server.luceneserver.field.BindingValuesSources.NumericEmptyValuesSource; -import com.yelp.nrtsearch.server.luceneserver.field.BindingValuesSources.NumericLengthValuesSource; -import com.yelp.nrtsearch.server.luceneserver.field.BindingValuesSources.SortedNumericEmptyValuesSource; -import com.yelp.nrtsearch.server.luceneserver.field.BindingValuesSources.SortedNumericLengthValuesSource; -import com.yelp.nrtsearch.server.luceneserver.field.BindingValuesSources.SortedNumericMinValuesSource; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Bindable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.RangeQueryable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.TermQueryable; import java.io.IOException; import java.util.List; import java.util.function.Function; @@ -242,21 +236,23 @@ public DoubleValuesSource getExpressionBinding(String property) { switch (property) { case VALUE_PROPERTY: if (isMultiValue()) { - return new SortedNumericMinValuesSource(getName(), getBindingDecoder()); + return new BindingValuesSources.SortedNumericMinValuesSource( + getName(), getBindingDecoder()); } else { - return new NumericDecodedValuesSource(getName(), getBindingDecoder()); + return new BindingValuesSources.NumericDecodedValuesSource( + getName(), getBindingDecoder()); } case LENGTH_BINDING_PROPERTY: if (isMultiValue()) { - return new SortedNumericLengthValuesSource(getName()); + return new BindingValuesSources.SortedNumericLengthValuesSource(getName()); } else { - return new NumericLengthValuesSource(getName()); + return new BindingValuesSources.NumericLengthValuesSource(getName()); } case EMPTY_BINDING_PROPERTY: if (isMultiValue()) { - return new SortedNumericEmptyValuesSource(getName()); + return new BindingValuesSources.SortedNumericEmptyValuesSource(getName()); } else { - return new NumericEmptyValuesSource(getName()); + return new BindingValuesSources.NumericEmptyValuesSource(getName()); } default: throw new IllegalArgumentException("Unsupported expression binding property: " + property); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/ObjectFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/ObjectFieldDef.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/ObjectFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/ObjectFieldDef.java index bed84202f..2019ca5ca 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/ObjectFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/ObjectFieldDef.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -22,11 +22,11 @@ import com.google.protobuf.Struct; import com.google.protobuf.Value; import com.google.protobuf.util.JsonFormat; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.handler.AddDocumentHandler; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.handler.AddDocumentHandler; +import com.yelp.nrtsearch.server.index.IndexState; import java.io.IOException; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/PolygonfieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/PolygonfieldDef.java similarity index 86% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/PolygonfieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/PolygonfieldDef.java index 3877e6191..8a432294c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/PolygonfieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/PolygonfieldDef.java @@ -13,18 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; -import static com.yelp.nrtsearch.server.luceneserver.field.ObjectFieldDef.bytesRefToStruct; -import static com.yelp.nrtsearch.server.luceneserver.field.ObjectFieldDef.jsonToStruct; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; import com.google.protobuf.Struct; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.PolygonQueryable; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.GeoPointQuery; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.properties.PolygonQueryable; import java.io.IOException; import java.text.ParseException; import java.util.Arrays; @@ -82,7 +80,8 @@ public void parseDocumentField( .forEach(document::add); if (isStored()) { - document.add(new StoredField(this.getName(), jsonToStruct(fieldValue).toByteArray())); + document.add( + new StoredField(this.getName(), ObjectFieldDef.jsonToStruct(fieldValue).toByteArray())); } } if (hasDocValues()) { @@ -109,7 +108,7 @@ public LoadedDocValues getDocValues(LeafReaderContext context) throws IO @Override public SearchResponse.Hit.FieldValue getStoredFieldValue(StoredValue value) { - Struct struct = bytesRefToStruct(value.getBinaryValue()); + Struct struct = ObjectFieldDef.bytesRefToStruct(value.getBinaryValue()); return SearchResponse.Hit.FieldValue.newBuilder().setStructValue(struct).build(); } diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/RuntimeFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/RuntimeFieldDef.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/RuntimeFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/RuntimeFieldDef.java index 1aae0326e..44c624f8a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/RuntimeFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/RuntimeFieldDef.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef.FacetValueType; -import com.yelp.nrtsearch.server.luceneserver.script.RuntimeScript; +import com.yelp.nrtsearch.server.field.IndexableFieldDef.FacetValueType; +import com.yelp.nrtsearch.server.script.RuntimeScript; /** * Field definition for a runtime field. Runtime fields are able to produce a value for each given diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/TextBaseFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/TextBaseFieldDef.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/TextBaseFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/TextBaseFieldDef.java index 8f9cb4473..a49ffe4e2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/TextBaseFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/TextBaseFieldDef.java @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.analysis.AnalyzerCreator; +import com.yelp.nrtsearch.server.analysis.PosIncGapAnalyzerWrapper; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; +import com.yelp.nrtsearch.server.field.properties.TermQueryable; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.Field; -import com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator; -import com.yelp.nrtsearch.server.luceneserver.analysis.PosIncGapAnalyzerWrapper; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.TermQueryable; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup.SortedLookup; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup.SortedSetLookup; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup.SortedLookup; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup.SortedSetLookup; import java.io.IOException; import java.util.Collections; import java.util.HashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/TextFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/TextFieldDef.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/TextFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/TextFieldDef.java index 7410bcf38..535c4609c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/TextFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/TextFieldDef.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import com.yelp.nrtsearch.server.grpc.Field; import org.apache.lucene.document.FieldType; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/VectorFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/VectorFieldDef.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/VectorFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/VectorFieldDef.java index 782a8ec7a..452ec23cf 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/VectorFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/VectorFieldDef.java @@ -13,22 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.doc.LoadedDocValues.SingleSearchVector; +import com.yelp.nrtsearch.server.doc.LoadedDocValues.SingleVector; +import com.yelp.nrtsearch.server.field.properties.VectorQueryable; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.KnnQuery; import com.yelp.nrtsearch.server.grpc.VectorIndexingOptions; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues.SingleSearchVector; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues.SingleVector; -import com.yelp.nrtsearch.server.luceneserver.field.properties.VectorQueryable; -import com.yelp.nrtsearch.server.luceneserver.query.vector.NrtKnnByteVectorQuery; -import com.yelp.nrtsearch.server.luceneserver.query.vector.NrtKnnFloatVectorQuery; -import com.yelp.nrtsearch.server.luceneserver.vector.ByteVectorType; -import com.yelp.nrtsearch.server.luceneserver.vector.FloatVectorType; +import com.yelp.nrtsearch.server.query.vector.NrtKnnByteVectorQuery; +import com.yelp.nrtsearch.server.query.vector.NrtKnnFloatVectorQuery; +import com.yelp.nrtsearch.server.vector.ByteVectorType; +import com.yelp.nrtsearch.server.vector.FloatVectorType; import java.io.IOException; import java.nio.ByteBuffer; import java.util.List; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/VirtualFieldDef.java b/src/main/java/com/yelp/nrtsearch/server/field/VirtualFieldDef.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/VirtualFieldDef.java rename to src/main/java/com/yelp/nrtsearch/server/field/VirtualFieldDef.java index 9d7cb3a11..3d452e7f5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/VirtualFieldDef.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/VirtualFieldDef.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; +import com.yelp.nrtsearch.server.field.properties.Bindable; +import com.yelp.nrtsearch.server.field.properties.Sortable; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Bindable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; import org.apache.lucene.search.DoubleValuesSource; import org.apache.lucene.search.SortField; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/Bindable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/Bindable.java similarity index 84% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/Bindable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/Bindable.java index b9dcbadf2..37781e7b0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/Bindable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/Bindable.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; +import com.yelp.nrtsearch.server.field.FieldDef; import org.apache.lucene.search.DoubleValuesSource; /** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * be bound into lucene {@link org.apache.lucene.expressions.Expression} scripts. + * Trait interface for {@link FieldDef} types that can be bound into lucene {@link + * org.apache.lucene.expressions.Expression} scripts. */ public interface Bindable { String VALUE_PROPERTY = "value"; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/GeoQueryable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/GeoQueryable.java similarity index 88% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/GeoQueryable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/GeoQueryable.java index bd578db60..759e71b3d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/GeoQueryable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/GeoQueryable.java @@ -13,17 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.GeoBoundingBoxQuery; import com.yelp.nrtsearch.server.grpc.GeoPolygonQuery; import com.yelp.nrtsearch.server.grpc.GeoRadiusQuery; import org.apache.lucene.search.Query; -/** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * be queried by geo-related queries. - */ +/** Trait interface for {@link FieldDef} types that can be queried by geo-related queries. */ public interface GeoQueryable { /** * Build a geo bounding box query for this field type with the given configuration. diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/GlobalOrdinalable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/GlobalOrdinalable.java similarity index 83% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/GlobalOrdinalable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/GlobalOrdinalable.java index d56f89cec..2fe12bcf6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/GlobalOrdinalable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/GlobalOrdinalable.java @@ -13,15 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup; import java.io.IOException; import org.apache.lucene.index.IndexReader; /** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * use global ordinals for text based doc values. + * Trait interface for {@link FieldDef} types that can use global ordinals for text based doc + * values. */ public interface GlobalOrdinalable { diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/PolygonQueryable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/PolygonQueryable.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/PolygonQueryable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/PolygonQueryable.java index 02e17ecd8..b0cf628c4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/PolygonQueryable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/PolygonQueryable.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; import com.yelp.nrtsearch.server.grpc.GeoPointQuery; import org.apache.lucene.search.Query; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/RangeQueryable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/RangeQueryable.java similarity index 82% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/RangeQueryable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/RangeQueryable.java index 64c910d59..315085665 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/RangeQueryable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/RangeQueryable.java @@ -13,15 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.RangeQuery; import org.apache.lucene.search.Query; -/** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * be queried by a range query. - */ +/** Trait interface for {@link FieldDef} types that can be queried by a range query. */ public interface RangeQueryable { /** * Build a range query for this field type with the given configuration. diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/Sortable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/Sortable.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/Sortable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/Sortable.java index 46ffd8cbc..c0fed573f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/Sortable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/Sortable.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.CompositeFieldValue; import com.yelp.nrtsearch.server.grpc.Selector; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortParser; +import com.yelp.nrtsearch.server.search.sort.SortParser; import java.util.function.BiFunction; import java.util.function.Function; import org.apache.lucene.search.SortField; @@ -26,8 +27,8 @@ import org.apache.lucene.search.SortedSetSelector; /** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * be used as a {@link SortField} during search or indexing. + * Trait interface for {@link FieldDef} types that can be used as a {@link SortField} during search + * or indexing. */ public interface Sortable { Function NUMERIC_TYPE_PARSER = diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/TermQueryable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/TermQueryable.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/TermQueryable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/TermQueryable.java index 43c053dfe..5924b11f5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/TermQueryable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/TermQueryable.java @@ -13,16 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.TermInSetQuery; import com.yelp.nrtsearch.server.grpc.TermQuery; import java.util.List; import org.apache.lucene.search.Query; /** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * be queried by a {@link TermQuery} or {@link TermInSetQuery}. + * Trait interface for {@link FieldDef} types that can be queried by a {@link TermQuery} or {@link + * TermInSetQuery}. */ public interface TermQueryable { /** diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/VectorQueryable.java b/src/main/java/com/yelp/nrtsearch/server/field/properties/VectorQueryable.java similarity index 82% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/VectorQueryable.java rename to src/main/java/com/yelp/nrtsearch/server/field/properties/VectorQueryable.java index 9effc3b85..18f86d71c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/field/properties/VectorQueryable.java +++ b/src/main/java/com/yelp/nrtsearch/server/field/properties/VectorQueryable.java @@ -13,15 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field.properties; +package com.yelp.nrtsearch.server.field.properties; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.KnnQuery; import org.apache.lucene.search.Query; -/** - * Trait interface for {@link com.yelp.nrtsearch.server.luceneserver.field.FieldDef} types that can - * be queried by a {@link KnnQuery}. - */ +/** Trait interface for {@link FieldDef} types that can be queried by a {@link KnnQuery}. */ public interface VectorQueryable { /** * Build a knn query for this field type with the given configuration. diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/geo/GeoPoint.java b/src/main/java/com/yelp/nrtsearch/server/geo/GeoPoint.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/geo/GeoPoint.java rename to src/main/java/com/yelp/nrtsearch/server/geo/GeoPoint.java index 2dc96726e..c6a3dcfb3 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/geo/GeoPoint.java +++ b/src/main/java/com/yelp/nrtsearch/server/geo/GeoPoint.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.geo; +package com.yelp.nrtsearch.server.geo; import it.unimi.dsi.fastutil.doubles.DoubleDoublePair; import org.apache.lucene.util.SloppyMath; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/geo/GeoUtils.java b/src/main/java/com/yelp/nrtsearch/server/geo/GeoUtils.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/geo/GeoUtils.java rename to src/main/java/com/yelp/nrtsearch/server/geo/GeoUtils.java index 1cc39d409..f693a7648 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/geo/GeoUtils.java +++ b/src/main/java/com/yelp/nrtsearch/server/geo/GeoUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.geo; +package com.yelp.nrtsearch.server.geo; import org.apache.lucene.util.SloppyMath; diff --git a/src/main/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplier.java b/src/main/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplier.java index 46f0cdffd..6b0db9309 100644 --- a/src/main/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplier.java +++ b/src/main/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplier.java @@ -15,7 +15,7 @@ */ package com.yelp.nrtsearch.server.grpc; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import io.grpc.Metadata; import io.grpc.ServerCall; import io.grpc.ServerCallExecutorSupplier; diff --git a/src/main/java/com/yelp/nrtsearch/server/grpc/LuceneServer.java b/src/main/java/com/yelp/nrtsearch/server/grpc/LuceneServer.java index 698124e5f..ca2ccd77f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/grpc/LuceneServer.java +++ b/src/main/java/com/yelp/nrtsearch/server/grpc/LuceneServer.java @@ -25,65 +25,58 @@ import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.util.JsonFormat; +import com.yelp.nrtsearch.server.analysis.AnalyzerCreator; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.config.QueryCacheConfig; -import com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; -import com.yelp.nrtsearch.server.luceneserver.custom.request.CustomRequestProcessor; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.handler.AddDocumentHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.AddReplicaHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.BackupWarmingQueriesHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.CommitHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.CopyFilesHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.CreateIndexHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.CreateSnapshotHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.CustomHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.DeleteAllDocumentsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.DeleteByQueryHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.DeleteDocumentsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.DeleteIndexHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.ForceMergeDeletesHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.ForceMergeHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.GetAllSnapshotIndexGenHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.GetNodesInfoHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.GetStateHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.GlobalStateHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.IndicesHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.LiveSettingsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.LiveSettingsV2Handler; -import com.yelp.nrtsearch.server.luceneserver.handler.MetricsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.NewNRTPointHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.ReadyHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.RecvCopyStateHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.RecvRawFileHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.RecvRawFileV2Handler; -import com.yelp.nrtsearch.server.luceneserver.handler.RefreshHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.RegisterFieldsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.ReleaseSnapshotHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.ReloadStateHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.ReplicaCurrentSearchingVersionHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchV2Handler; -import com.yelp.nrtsearch.server.luceneserver.handler.SendRawFileHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.SettingsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.SettingsV2Handler; -import com.yelp.nrtsearch.server.luceneserver.handler.StartIndexHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.StartIndexV2Handler; -import com.yelp.nrtsearch.server.luceneserver.handler.StatsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.StatusHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.StopIndexHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.UpdateFieldsHandler; -import com.yelp.nrtsearch.server.luceneserver.handler.WriteNRTPointHandler; -import com.yelp.nrtsearch.server.luceneserver.highlights.HighlighterService; -import com.yelp.nrtsearch.server.luceneserver.logging.HitsLoggerCreator; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescorerCreator; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTaskCreator; -import com.yelp.nrtsearch.server.luceneserver.search.cache.NrtQueryCache; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreator; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.custom.request.CustomRequestProcessor; +import com.yelp.nrtsearch.server.field.FieldDefCreator; +import com.yelp.nrtsearch.server.handler.AddDocumentHandler; +import com.yelp.nrtsearch.server.handler.AddReplicaHandler; +import com.yelp.nrtsearch.server.handler.BackupWarmingQueriesHandler; +import com.yelp.nrtsearch.server.handler.CommitHandler; +import com.yelp.nrtsearch.server.handler.CopyFilesHandler; +import com.yelp.nrtsearch.server.handler.CreateIndexHandler; +import com.yelp.nrtsearch.server.handler.CreateSnapshotHandler; +import com.yelp.nrtsearch.server.handler.CustomHandler; +import com.yelp.nrtsearch.server.handler.DeleteAllDocumentsHandler; +import com.yelp.nrtsearch.server.handler.DeleteByQueryHandler; +import com.yelp.nrtsearch.server.handler.DeleteDocumentsHandler; +import com.yelp.nrtsearch.server.handler.DeleteIndexHandler; +import com.yelp.nrtsearch.server.handler.ForceMergeDeletesHandler; +import com.yelp.nrtsearch.server.handler.ForceMergeHandler; +import com.yelp.nrtsearch.server.handler.GetAllSnapshotIndexGenHandler; +import com.yelp.nrtsearch.server.handler.GetNodesInfoHandler; +import com.yelp.nrtsearch.server.handler.GetStateHandler; +import com.yelp.nrtsearch.server.handler.GlobalStateHandler; +import com.yelp.nrtsearch.server.handler.IndicesHandler; +import com.yelp.nrtsearch.server.handler.LiveSettingsHandler; +import com.yelp.nrtsearch.server.handler.LiveSettingsV2Handler; +import com.yelp.nrtsearch.server.handler.MetricsHandler; +import com.yelp.nrtsearch.server.handler.NewNRTPointHandler; +import com.yelp.nrtsearch.server.handler.ReadyHandler; +import com.yelp.nrtsearch.server.handler.RecvCopyStateHandler; +import com.yelp.nrtsearch.server.handler.RecvRawFileHandler; +import com.yelp.nrtsearch.server.handler.RecvRawFileV2Handler; +import com.yelp.nrtsearch.server.handler.RefreshHandler; +import com.yelp.nrtsearch.server.handler.RegisterFieldsHandler; +import com.yelp.nrtsearch.server.handler.ReleaseSnapshotHandler; +import com.yelp.nrtsearch.server.handler.ReloadStateHandler; +import com.yelp.nrtsearch.server.handler.ReplicaCurrentSearchingVersionHandler; +import com.yelp.nrtsearch.server.handler.SearchHandler; +import com.yelp.nrtsearch.server.handler.SearchV2Handler; +import com.yelp.nrtsearch.server.handler.SendRawFileHandler; +import com.yelp.nrtsearch.server.handler.SettingsHandler; +import com.yelp.nrtsearch.server.handler.SettingsV2Handler; +import com.yelp.nrtsearch.server.handler.StartIndexHandler; +import com.yelp.nrtsearch.server.handler.StartIndexV2Handler; +import com.yelp.nrtsearch.server.handler.StatsHandler; +import com.yelp.nrtsearch.server.handler.StatusHandler; +import com.yelp.nrtsearch.server.handler.StopIndexHandler; +import com.yelp.nrtsearch.server.handler.UpdateFieldsHandler; +import com.yelp.nrtsearch.server.handler.WriteNRTPointHandler; +import com.yelp.nrtsearch.server.highlights.HighlighterService; +import com.yelp.nrtsearch.server.logging.HitsLoggerCreator; import com.yelp.nrtsearch.server.modules.LuceneServerModule; import com.yelp.nrtsearch.server.monitoring.Configuration; import com.yelp.nrtsearch.server.monitoring.DeadlineMetrics; @@ -100,6 +93,13 @@ import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.PluginsService; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.rescore.RescorerCreator; +import com.yelp.nrtsearch.server.script.ScriptService; +import com.yelp.nrtsearch.server.search.FetchTaskCreator; +import com.yelp.nrtsearch.server.search.cache.NrtQueryCache; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreator; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.tools.cli.VersionProvider; import io.grpc.Server; import io.grpc.ServerBuilder; diff --git a/src/main/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClient.java b/src/main/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClient.java index 0ae1accd2..1af55561a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClient.java +++ b/src/main/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClient.java @@ -20,7 +20,7 @@ import com.google.common.annotations.VisibleForTesting; import com.yelp.nrtsearch.server.grpc.ReplicationServerGrpc.ReplicationServerBlockingStub; import com.yelp.nrtsearch.server.grpc.discovery.PrimaryFileNameResolverProvider; -import com.yelp.nrtsearch.server.luceneserver.nrt.SimpleCopyJob.FileChunkStreamingIterator; +import com.yelp.nrtsearch.server.nrt.SimpleCopyJob.FileChunkStreamingIterator; import io.grpc.Deadline; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/AddDocumentHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/AddDocumentHandler.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/AddDocumentHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/AddDocumentHandler.java index 5570c96f5..f02bc777d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/AddDocumentHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/AddDocumentHandler.java @@ -13,21 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.protobuf.ProtocolStringList; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IdFieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentResponse; import com.yelp.nrtsearch.server.grpc.DeadlineUtils; import com.yelp.nrtsearch.server.grpc.FacetHierarchyPath; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IdFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Context; import io.grpc.Status; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/AddReplicaHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/AddReplicaHandler.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/AddReplicaHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/AddReplicaHandler.java index caafaf793..df18f27c2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/AddReplicaHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/AddReplicaHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.AddReplicaRequest; import com.yelp.nrtsearch.server.grpc.AddReplicaResponse; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/BackupWarmingQueriesHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/BackupWarmingQueriesHandler.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/BackupWarmingQueriesHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/BackupWarmingQueriesHandler.java index 0bd08d666..267abef37 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/BackupWarmingQueriesHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/BackupWarmingQueriesHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.BackupWarmingQueriesRequest; import com.yelp.nrtsearch.server.grpc.BackupWarmingQueriesResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.warming.Warmer; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.warming.Warmer; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CommitHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/CommitHandler.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CommitHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/CommitHandler.java index fbdd2b5c7..f17da91b0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CommitHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/CommitHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.CommitRequest; import com.yelp.nrtsearch.server.grpc.CommitResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Context; import io.grpc.Status; import io.grpc.StatusRuntimeException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CopyFilesHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/CopyFilesHandler.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CopyFilesHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/CopyFilesHandler.java index 7256b163c..7a617a8cc 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CopyFilesHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/CopyFilesHandler.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.CopyFiles; import com.yelp.nrtsearch.server.grpc.TransferStatus; import com.yelp.nrtsearch.server.grpc.TransferStatusCode; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTReplicaNode; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; import com.yelp.nrtsearch.server.monitoring.NrtMetrics; +import com.yelp.nrtsearch.server.nrt.NRTReplicaNode; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CreateIndexHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/CreateIndexHandler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CreateIndexHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/CreateIndexHandler.java index 2214a7eda..782488573 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CreateIndexHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/CreateIndexHandler.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.CreateIndexRequest; import com.yelp.nrtsearch.server.grpc.CreateIndexResponse; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import org.slf4j.Logger; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CreateSnapshotHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/CreateSnapshotHandler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CreateSnapshotHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/CreateSnapshotHandler.java index 1d83eebea..6effba2a6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CreateSnapshotHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/CreateSnapshotHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.gson.JsonObject; import com.yelp.nrtsearch.server.grpc.CreateSnapshotRequest; import com.yelp.nrtsearch.server.grpc.CreateSnapshotResponse; import com.yelp.nrtsearch.server.grpc.SnapshotId; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CustomHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/CustomHandler.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CustomHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/CustomHandler.java index 362bfddff..cb221407f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/CustomHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/CustomHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; +import com.yelp.nrtsearch.server.custom.request.CustomRequestProcessor; import com.yelp.nrtsearch.server.grpc.CustomRequest; import com.yelp.nrtsearch.server.grpc.CustomResponse; -import com.yelp.nrtsearch.server.luceneserver.custom.request.CustomRequestProcessor; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import org.slf4j.Logger; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteAllDocumentsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteAllDocumentsHandler.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteAllDocumentsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/DeleteAllDocumentsHandler.java index 84ed1c55b..f9189901a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteAllDocumentsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteAllDocumentsHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteByQueryHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteByQueryHandler.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteByQueryHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/DeleteByQueryHandler.java index f5e9b74c5..8378b748c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteByQueryHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteByQueryHandler.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.AddDocumentResponse; import com.yelp.nrtsearch.server.grpc.DeleteByQueryRequest; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteDocumentsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteDocumentsHandler.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteDocumentsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/DeleteDocumentsHandler.java index 3291b634b..5fad007a0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteDocumentsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteDocumentsHandler.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.ProtocolStringList; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteIndexHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteIndexHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteIndexHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/DeleteIndexHandler.java index a8a95426e..d39d554bd 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/DeleteIndexHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/DeleteIndexHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.DeleteIndexRequest; import com.yelp.nrtsearch.server.grpc.DeleteIndexResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ForceMergeDeletesHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/ForceMergeDeletesHandler.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ForceMergeDeletesHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/ForceMergeDeletesHandler.java index d4afc768d..cef5943bd 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ForceMergeDeletesHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/ForceMergeDeletesHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.ForceMergeDeletesRequest; import com.yelp.nrtsearch.server.grpc.ForceMergeDeletesResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ForceMergeHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/ForceMergeHandler.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ForceMergeHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/ForceMergeHandler.java index 4ec06ed74..468e32221 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ForceMergeHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/ForceMergeHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.ForceMergeRequest; import com.yelp.nrtsearch.server.grpc.ForceMergeResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetAllSnapshotIndexGenHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/GetAllSnapshotIndexGenHandler.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetAllSnapshotIndexGenHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/GetAllSnapshotIndexGenHandler.java index e422f2768..b381489d2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetAllSnapshotIndexGenHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/GetAllSnapshotIndexGenHandler.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.GetAllSnapshotGenRequest; import com.yelp.nrtsearch.server.grpc.GetAllSnapshotGenResponse; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.stub.StreamObserver; import java.io.IOException; import java.util.Set; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetNodesInfoHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/GetNodesInfoHandler.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetNodesInfoHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/GetNodesInfoHandler.java index 74d16b2dc..919a2293a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetNodesInfoHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/GetNodesInfoHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.GetNodesRequest; import com.yelp.nrtsearch.server.grpc.GetNodesResponse; import com.yelp.nrtsearch.server.grpc.NodeInfo; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTPrimaryNode; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.nrt.NRTPrimaryNode; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.server.utils.HostPort; import io.grpc.Status; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetStateHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/GetStateHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetStateHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/GetStateHandler.java index 15d8b3db7..82952e47f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GetStateHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/GetStateHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.gson.JsonObject; import com.yelp.nrtsearch.server.grpc.StateRequest; import com.yelp.nrtsearch.server.grpc.StateResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GlobalStateHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/GlobalStateHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GlobalStateHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/GlobalStateHandler.java index 72399db64..46784fbc8 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/GlobalStateHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/GlobalStateHandler.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.GlobalStateRequest; import com.yelp.nrtsearch.server.grpc.GlobalStateResponse; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import org.slf4j.Logger; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/Handler.java b/src/main/java/com/yelp/nrtsearch/server/handler/Handler.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/Handler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/Handler.java index 2b0d55ee9..fd270370e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/Handler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/Handler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.common.annotations.VisibleForTesting; import com.google.protobuf.GeneratedMessageV3; import com.yelp.nrtsearch.server.grpc.LuceneServerStubBuilder; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.ServerCallStreamObserver; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/IndicesHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/IndicesHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/IndicesHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/IndicesHandler.java index 4b9e51b50..65278674e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/IndicesHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/IndicesHandler.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.IndexStatsResponse; import com.yelp.nrtsearch.server.grpc.IndicesRequest; import com.yelp.nrtsearch.server.grpc.IndicesResponse; import com.yelp.nrtsearch.server.grpc.StatsResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/LiveSettingsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/LiveSettingsHandler.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/LiveSettingsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/LiveSettingsHandler.java index 2a1e26df1..1f2aeec8c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/LiveSettingsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/LiveSettingsHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.DoubleValue; import com.google.protobuf.Int32Value; @@ -21,9 +21,9 @@ import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.LiveSettingsRequest; import com.yelp.nrtsearch.server.grpc.LiveSettingsResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/LiveSettingsV2Handler.java b/src/main/java/com/yelp/nrtsearch/server/handler/LiveSettingsV2Handler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/LiveSettingsV2Handler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/LiveSettingsV2Handler.java index 5030b49bf..5a525050f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/LiveSettingsV2Handler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/LiveSettingsV2Handler.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.LiveSettingsV2Request; import com.yelp.nrtsearch.server.grpc.LiveSettingsV2Response; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/MetricsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/MetricsHandler.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/MetricsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/MetricsHandler.java index 09141addf..9bb9c6ec1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/MetricsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/MetricsHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.api.HttpBody; import com.google.protobuf.ByteString; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/NewNRTPointHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/NewNRTPointHandler.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/NewNRTPointHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/NewNRTPointHandler.java index a4f75f69b..cadf99c95 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/NewNRTPointHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/NewNRTPointHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.NewNRTPoint; import com.yelp.nrtsearch.server.grpc.TransferStatus; import com.yelp.nrtsearch.server.grpc.TransferStatusCode; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReadyHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/ReadyHandler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReadyHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/ReadyHandler.java index e289396a7..4383b15cf 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReadyHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/ReadyHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.common.base.Splitter; import com.google.common.collect.Sets; import com.yelp.nrtsearch.server.grpc.HealthCheckResponse; import com.yelp.nrtsearch.server.grpc.ReadyCheckRequest; import com.yelp.nrtsearch.server.grpc.TransferStatusCode; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvCopyStateHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/RecvCopyStateHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvCopyStateHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/RecvCopyStateHandler.java index 7319f8647..be631a563 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvCopyStateHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/RecvCopyStateHandler.java @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.ByteString; import com.yelp.nrtsearch.server.grpc.CopyState; import com.yelp.nrtsearch.server.grpc.CopyStateRequest; import com.yelp.nrtsearch.server.grpc.FileMetadata; import com.yelp.nrtsearch.server.grpc.FilesMetadata; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTPrimaryNode; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.nrt.NRTPrimaryNode; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvRawFileHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/RecvRawFileHandler.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvRawFileHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/RecvRawFileHandler.java index b3abb0c3d..f39cf8606 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvRawFileHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/RecvRawFileHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.ByteString; import com.yelp.nrtsearch.server.grpc.FileInfo; import com.yelp.nrtsearch.server.grpc.RawFileChunk; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvRawFileV2Handler.java b/src/main/java/com/yelp/nrtsearch/server/handler/RecvRawFileV2Handler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvRawFileV2Handler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/RecvRawFileV2Handler.java index bfd98542b..360992e23 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RecvRawFileV2Handler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/RecvRawFileV2Handler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.ByteString; import com.yelp.nrtsearch.server.grpc.FileInfo; import com.yelp.nrtsearch.server.grpc.RawFileChunk; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.stub.StreamObserver; import java.io.IOException; import org.apache.lucene.store.IOContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RefreshHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/RefreshHandler.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RefreshHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/RefreshHandler.java index 4863f4856..b1d2345fa 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RefreshHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/RefreshHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.RefreshRequest; import com.yelp.nrtsearch.server.grpc.RefreshResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RegisterFieldsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/RegisterFieldsHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RegisterFieldsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/RegisterFieldsHandler.java index 97964201b..d157926ad 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/RegisterFieldsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/RegisterFieldsHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.FieldDefResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReleaseSnapshotHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/ReleaseSnapshotHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReleaseSnapshotHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/ReleaseSnapshotHandler.java index ba283c823..b7ba3993e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReleaseSnapshotHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/ReleaseSnapshotHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.ReleaseSnapshotRequest; import com.yelp.nrtsearch.server.grpc.ReleaseSnapshotResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReloadStateHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/ReloadStateHandler.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReloadStateHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/ReloadStateHandler.java index 446bbc6b6..446c15834 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReloadStateHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/ReloadStateHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.ReloadStateRequest; import com.yelp.nrtsearch.server.grpc.ReloadStateResponse; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import org.slf4j.Logger; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReplicaCurrentSearchingVersionHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/ReplicaCurrentSearchingVersionHandler.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReplicaCurrentSearchingVersionHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/ReplicaCurrentSearchingVersionHandler.java index c9fa195f3..651356df1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/ReplicaCurrentSearchingVersionHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/ReplicaCurrentSearchingVersionHandler.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.IndexName; import com.yelp.nrtsearch.server.grpc.SearcherVersion; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SearchHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/SearchHandler.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SearchHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/SearchHandler.java index e72f09535..5b287a7f0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SearchHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/SearchHandler.java @@ -13,12 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.common.collect.Lists; import com.google.common.util.concurrent.MoreExecutors; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.util.JsonFormat.Printer; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.facet.DrillSidewaysImpl; +import com.yelp.nrtsearch.server.facet.FacetTopDocs; +import com.yelp.nrtsearch.server.field.BooleanFieldDef; +import com.yelp.nrtsearch.server.field.DateTimeFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.RuntimeFieldDef; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; import com.yelp.nrtsearch.server.grpc.DeadlineUtils; import com.yelp.nrtsearch.server.grpc.FacetResult; import com.yelp.nrtsearch.server.grpc.ProfileResult; @@ -29,28 +38,20 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue; import com.yelp.nrtsearch.server.grpc.SearchResponse.SearchState; import com.yelp.nrtsearch.server.grpc.TotalHits; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.facet.DrillSidewaysImpl; -import com.yelp.nrtsearch.server.luceneserver.facet.FacetTopDocs; -import com.yelp.nrtsearch.server.luceneserver.field.BooleanFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.DateTimeFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.RuntimeFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.innerhit.InnerHitFetchTask; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescoreTask; -import com.yelp.nrtsearch.server.luceneserver.script.RuntimeScript; -import com.yelp.nrtsearch.server.luceneserver.search.FieldFetchContext; -import com.yelp.nrtsearch.server.luceneserver.search.MyIndexSearcher; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCutoffWrapper.CollectionTimeoutException; -import com.yelp.nrtsearch.server.luceneserver.search.SearchRequestProcessor; -import com.yelp.nrtsearch.server.luceneserver.search.SearcherResult; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.innerhit.InnerHitFetchTask; import com.yelp.nrtsearch.server.monitoring.SearchResponseCollector; +import com.yelp.nrtsearch.server.rescore.RescoreTask; +import com.yelp.nrtsearch.server.script.RuntimeScript; +import com.yelp.nrtsearch.server.search.FetchTasks; +import com.yelp.nrtsearch.server.search.FieldFetchContext; +import com.yelp.nrtsearch.server.search.MyIndexSearcher; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchCutoffWrapper.CollectionTimeoutException; +import com.yelp.nrtsearch.server.search.SearchRequestProcessor; +import com.yelp.nrtsearch.server.search.SearcherResult; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.server.utils.ObjectToCompositeFieldTransformer; import com.yelp.nrtsearch.server.utils.ProtoMessagePrinter; import io.grpc.Status; @@ -372,7 +373,7 @@ public SearchResponse handle(IndexState indexState, SearchRequest searchRequest) /** * Fetch/compute field values for the top hits. This operation may be done in parallel, based on * the setting for the fetch thread pool. In addition to filling hit fields, any query {@link - * com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask}s are executed. + * FetchTasks.FetchTask}s are executed. * * @param searchContext search parameters * @throws IOException on error reading index data diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SearchV2Handler.java b/src/main/java/com/yelp/nrtsearch/server/handler/SearchV2Handler.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SearchV2Handler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/SearchV2Handler.java index 090c3aab7..f05ab2c97 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SearchV2Handler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/SearchV2Handler.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.Any; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.util.JsonFormat.Printer; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.server.utils.ProtoMessagePrinter; import io.grpc.Status; import io.grpc.StatusRuntimeException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SendRawFileHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/SendRawFileHandler.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SendRawFileHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/SendRawFileHandler.java index 15c2c4196..75909b415 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SendRawFileHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/SendRawFileHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.RawFileChunk; import com.yelp.nrtsearch.server.grpc.TransferStatus; import com.yelp.nrtsearch.server.grpc.TransferStatusCode; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.stub.StreamObserver; import java.io.File; import java.io.FileOutputStream; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SettingsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/SettingsHandler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SettingsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/SettingsHandler.java index 950ffc229..d38acc2e5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SettingsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/SettingsHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.BoolValue; import com.google.protobuf.DoubleValue; @@ -23,9 +23,9 @@ import com.yelp.nrtsearch.server.grpc.IndexSettings; import com.yelp.nrtsearch.server.grpc.SettingsRequest; import com.yelp.nrtsearch.server.grpc.SettingsResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SettingsV2Handler.java b/src/main/java/com/yelp/nrtsearch/server/handler/SettingsV2Handler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SettingsV2Handler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/SettingsV2Handler.java index df39071c7..a943ac6f1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/SettingsV2Handler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/SettingsV2Handler.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.IndexSettings; import com.yelp.nrtsearch.server.grpc.SettingsV2Request; import com.yelp.nrtsearch.server.grpc.SettingsV2Response; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StartIndexHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/StartIndexHandler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StartIndexHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/StartIndexHandler.java index 0538ddef6..d92906bec 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StartIndexHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/StartIndexHandler.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.StartIndexRequest; import com.yelp.nrtsearch.server.grpc.StartIndexResponse; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StartIndexV2Handler.java b/src/main/java/com/yelp/nrtsearch/server/handler/StartIndexV2Handler.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StartIndexV2Handler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/StartIndexV2Handler.java index 8f0031687..967ef117f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StartIndexV2Handler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/StartIndexV2Handler.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.StartIndexResponse; import com.yelp.nrtsearch.server.grpc.StartIndexV2Request; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StatsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/StatsHandler.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StatsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/StatsHandler.java index 1f8a9e367..7a89db25d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StatsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/StatsHandler.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.Searcher; import com.yelp.nrtsearch.server.grpc.StatsRequest; import com.yelp.nrtsearch.server.grpc.StatsResponse; import com.yelp.nrtsearch.server.grpc.Taxonomy; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StatusHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/StatusHandler.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StatusHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/StatusHandler.java index c27aeca4c..3975ea808 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StatusHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/StatusHandler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.HealthCheckRequest; import com.yelp.nrtsearch.server.grpc.HealthCheckResponse; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StopIndexHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/StopIndexHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StopIndexHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/StopIndexHandler.java index f77af96d9..f19d444c4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/StopIndexHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/StopIndexHandler.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.DummyResponse; import com.yelp.nrtsearch.server.grpc.StopIndexRequest; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import org.slf4j.Logger; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/UpdateFieldsHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/UpdateFieldsHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/UpdateFieldsHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/UpdateFieldsHandler.java index 29bdae84f..f889009f1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/UpdateFieldsHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/UpdateFieldsHandler.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.FieldDefResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.stub.StreamObserver; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/WriteNRTPointHandler.java b/src/main/java/com/yelp/nrtsearch/server/handler/WriteNRTPointHandler.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/WriteNRTPointHandler.java rename to src/main/java/com/yelp/nrtsearch/server/handler/WriteNRTPointHandler.java index 735b17d37..5265b0bc4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/handler/WriteNRTPointHandler.java +++ b/src/main/java/com/yelp/nrtsearch/server/handler/WriteNRTPointHandler.java @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.handler; +package com.yelp.nrtsearch.server.handler; import com.yelp.nrtsearch.server.grpc.IndexName; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; import com.yelp.nrtsearch.server.grpc.SearcherVersion; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTPrimaryNode; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.nrt.NRTPrimaryNode; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightFetchTask.java b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlightFetchTask.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightFetchTask.java rename to src/main/java/com/yelp/nrtsearch/server/highlights/HighlightFetchTask.java index 32a9c92f5..643aeb32b 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightFetchTask.java +++ b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlightFetchTask.java @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; -import static com.yelp.nrtsearch.server.luceneserver.highlights.HighlightUtils.createPerFieldSettings; +import static com.yelp.nrtsearch.server.highlights.HighlightUtils.createPerFieldSettings; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; import com.yelp.nrtsearch.server.grpc.Highlight; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Highlights; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.search.FetchTasks.FetchTask; +import com.yelp.nrtsearch.server.search.SearchContext; import java.io.IOException; import java.util.Map; import java.util.Map.Entry; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightSettings.java b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlightSettings.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightSettings.java rename to src/main/java/com/yelp/nrtsearch/server/highlights/HighlightSettings.java index 7b28b22b7..b763d35cb 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightSettings.java +++ b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlightSettings.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; import java.util.Arrays; import java.util.Locale; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightUtils.java b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlightUtils.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightUtils.java rename to src/main/java/com/yelp/nrtsearch/server/highlights/HighlightUtils.java index 04dbbba75..9c11bfc27 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlightUtils.java +++ b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlightUtils.java @@ -13,14 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; import com.yelp.nrtsearch.server.grpc.Highlight; import com.yelp.nrtsearch.server.grpc.Highlight.Settings; import com.yelp.nrtsearch.server.grpc.Highlight.Type; -import com.yelp.nrtsearch.server.luceneserver.highlights.HighlightSettings.Builder; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; import com.yelp.nrtsearch.server.utils.StructValueTransformer; import java.util.Collections; import java.util.HashMap; @@ -72,7 +71,7 @@ static Map createPerFieldSettings( } else { Settings settings = fieldSettingsFromRequest.get(field); HighlightSettings.Builder builder = - new Builder() + new HighlightSettings.Builder() .withHighlighter( // DEFAULT in field override has a different meaning: no override settings.getHighlighterType() == Type.DEFAULT diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/Highlighter.java b/src/main/java/com/yelp/nrtsearch/server/highlights/Highlighter.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/Highlighter.java rename to src/main/java/com/yelp/nrtsearch/server/highlights/Highlighter.java index 521c44c8e..4ff5ff281 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/Highlighter.java +++ b/src/main/java/com/yelp/nrtsearch/server/highlights/Highlighter.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.search.SearchContext; import java.io.IOException; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlighterService.java b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlighterService.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlighterService.java rename to src/main/java/com/yelp/nrtsearch/server/highlights/HighlighterService.java index 7fa683051..07efad3f1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/HighlighterService.java +++ b/src/main/java/com/yelp/nrtsearch/server/highlights/HighlighterService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.plugins.HighlighterPlugin; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/NRTFastVectorHighlighter.java b/src/main/java/com/yelp/nrtsearch/server/highlights/NRTFastVectorHighlighter.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/NRTFastVectorHighlighter.java rename to src/main/java/com/yelp/nrtsearch/server/highlights/NRTFastVectorHighlighter.java index 7a5f9b6e1..878cb668d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/highlights/NRTFastVectorHighlighter.java +++ b/src/main/java/com/yelp/nrtsearch/server/highlights/NRTFastVectorHighlighter.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.search.SearchContext; import java.io.IOException; import java.text.BreakIterator; import org.apache.lucene.document.FieldType; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/BackendStateManager.java b/src/main/java/com/yelp/nrtsearch/server/index/BackendStateManager.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/BackendStateManager.java rename to src/main/java/com/yelp/nrtsearch/server/index/BackendStateManager.java index c651bce5b..f516356eb 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/BackendStateManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/BackendStateManager.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.google.common.annotations.VisibleForTesting; import com.yelp.nrtsearch.server.grpc.Field; @@ -22,11 +22,11 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.index.FieldUpdateUtils.UpdatedFieldInfo; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.backend.StateBackend; +import com.yelp.nrtsearch.server.index.FieldUpdateUtils.UpdatedFieldInfo; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.state.backend.StateBackend; import java.io.IOException; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/BucketedTieredMergePolicy.java b/src/main/java/com/yelp/nrtsearch/server/index/BucketedTieredMergePolicy.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/BucketedTieredMergePolicy.java rename to src/main/java/com/yelp/nrtsearch/server/index/BucketedTieredMergePolicy.java index 2bd164e26..53de63436 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/BucketedTieredMergePolicy.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/BucketedTieredMergePolicy.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/DirectoryFactory.java b/src/main/java/com/yelp/nrtsearch/server/index/DirectoryFactory.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/DirectoryFactory.java rename to src/main/java/com/yelp/nrtsearch/server/index/DirectoryFactory.java index c0599d1cb..fbb0647c4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/DirectoryFactory.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/DirectoryFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.yelp.nrtsearch.server.config.IndexPreloadConfig; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/FieldAndFacetState.java b/src/main/java/com/yelp/nrtsearch/server/index/FieldAndFacetState.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/FieldAndFacetState.java rename to src/main/java/com/yelp/nrtsearch/server/index/FieldAndFacetState.java index 93e71569b..360ddafe4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/FieldAndFacetState.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/FieldAndFacetState.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; - +package com.yelp.nrtsearch.server.index; + +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IdFieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.ObjectFieldDef; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.Field; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IdFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.ObjectFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/FieldUpdateUtils.java b/src/main/java/com/yelp/nrtsearch/server/index/FieldUpdateUtils.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/FieldUpdateUtils.java rename to src/main/java/com/yelp/nrtsearch/server/index/FieldUpdateUtils.java index 7c5e75fec..961a016bc 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/FieldUpdateUtils.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/FieldUpdateUtils.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDefCreator; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.FieldType; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptService; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/ImmutableIndexState.java b/src/main/java/com/yelp/nrtsearch/server/index/ImmutableIndexState.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/ImmutableIndexState.java rename to src/main/java/com/yelp/nrtsearch/server/index/ImmutableIndexState.java index 698052b1f..7e37b8592 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/ImmutableIndexState.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/ImmutableIndexState.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.google.common.collect.ImmutableMap; import com.google.gson.JsonElement; @@ -28,22 +28,22 @@ import com.google.protobuf.UInt64Value; import com.google.protobuf.util.FieldMaskUtil; import com.google.protobuf.util.JsonFormat; +import com.yelp.nrtsearch.server.codec.ServerCodec; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IdFieldDef; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.IndexSettings; import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.codec.ServerCodec; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IdFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler.SearchHandlerException; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortParser; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.handler.SearchHandler.SearchHandlerException; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.search.sort.SortParser; +import com.yelp.nrtsearch.server.state.GlobalState; import java.io.IOException; import java.util.Collections; import java.util.EnumSet; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexAnalyzer.java b/src/main/java/com/yelp/nrtsearch/server/index/IndexAnalyzer.java similarity index 88% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexAnalyzer.java rename to src/main/java/com/yelp/nrtsearch/server/index/IndexAnalyzer.java index d5dd00688..15593d2f6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexAnalyzer.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/IndexAnalyzer.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; -import com.yelp.nrtsearch.server.luceneserver.field.ContextSuggestFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.field.ContextSuggestFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; import java.util.Optional; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.AnalyzerWrapper; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexSimilarity.java b/src/main/java/com/yelp/nrtsearch/server/index/IndexSimilarity.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexSimilarity.java rename to src/main/java/com/yelp/nrtsearch/server/index/IndexSimilarity.java index 701ccca29..fa7e7aa8a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexSimilarity.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/IndexSimilarity.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import org.apache.lucene.search.similarities.BM25Similarity; import org.apache.lucene.search.similarities.PerFieldSimilarityWrapper; import org.apache.lucene.search.similarities.Similarity; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexState.java b/src/main/java/com/yelp/nrtsearch/server/index/IndexState.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexState.java rename to src/main/java/com/yelp/nrtsearch/server/index/IndexState.java index f5378be0c..f6b22ef77 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexState.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/IndexState.java @@ -13,27 +13,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.google.common.collect.ImmutableMap; import com.google.gson.JsonObject; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.config.ThreadPoolConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.SegmentDocLookup; +import com.yelp.nrtsearch.server.field.ContextSuggestFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDefCreator; +import com.yelp.nrtsearch.server.field.IdFieldDef; +import com.yelp.nrtsearch.server.field.ObjectFieldDef; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.field.ContextSuggestFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.field.IdFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.ObjectFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.warming.Warmer; -import com.yelp.nrtsearch.server.luceneserver.warming.WarmerConfig; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.server.utils.FileUtils; +import com.yelp.nrtsearch.server.warming.Warmer; +import com.yelp.nrtsearch.server.warming.WarmerConfig; import java.io.Closeable; import java.io.IOException; import java.nio.file.Files; @@ -90,8 +91,7 @@ public abstract class IndexState implements Closeable { private static Map metaFields; /** - * Index level doc values lookup. Generates {@link - * com.yelp.nrtsearch.server.luceneserver.doc.SegmentDocLookup} for a given lucene segment. + * Index level doc values lookup. Generates {@link SegmentDocLookup} for a given lucene segment. */ public final DocLookup docLookup = new DocLookup(this::getField); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexStateManager.java b/src/main/java/com/yelp/nrtsearch/server/index/IndexStateManager.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexStateManager.java rename to src/main/java/com/yelp/nrtsearch/server/index/IndexStateManager.java index 883e0f88a..7d8b31c59 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/IndexStateManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/IndexStateManager.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.IndexSettings; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import java.io.Closeable; import java.io.IOException; import java.util.List; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/NrtIndexWriter.java b/src/main/java/com/yelp/nrtsearch/server/index/NrtIndexWriter.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/NrtIndexWriter.java rename to src/main/java/com/yelp/nrtsearch/server/index/NrtIndexWriter.java index 9c21ed4f9..e6415fdfa 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/NrtIndexWriter.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/NrtIndexWriter.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.yelp.nrtsearch.server.monitoring.IndexMetrics; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/ShardState.java b/src/main/java/com/yelp/nrtsearch/server/index/ShardState.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/ShardState.java rename to src/main/java/com/yelp/nrtsearch/server/index/ShardState.java index 863591dd5..e1e30a99f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/ShardState.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/ShardState.java @@ -13,24 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef.FacetValueType; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.DeadlineUtils; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef.FacetValueType; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler.SearchHandlerException; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTPrimaryNode; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTReplicaNode; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.search.MyIndexSearcher; -import com.yelp.nrtsearch.server.luceneserver.warming.WarmerConfig; +import com.yelp.nrtsearch.server.handler.SearchHandler.SearchHandlerException; import com.yelp.nrtsearch.server.monitoring.IndexMetrics; +import com.yelp.nrtsearch.server.nrt.NRTPrimaryNode; +import com.yelp.nrtsearch.server.nrt.NRTReplicaNode; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; +import com.yelp.nrtsearch.server.search.MyIndexSearcher; import com.yelp.nrtsearch.server.utils.FileUtils; import com.yelp.nrtsearch.server.utils.HostPort; +import com.yelp.nrtsearch.server.warming.WarmerConfig; import io.grpc.StatusRuntimeException; import java.io.Closeable; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/StartIndexProcessor.java b/src/main/java/com/yelp/nrtsearch/server/index/StartIndexProcessor.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/index/StartIndexProcessor.java rename to src/main/java/com/yelp/nrtsearch/server/index/StartIndexProcessor.java index 78d39e93f..b8ef3c657 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/index/StartIndexProcessor.java +++ b/src/main/java/com/yelp/nrtsearch/server/index/StartIndexProcessor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; @@ -21,10 +21,10 @@ import com.yelp.nrtsearch.server.grpc.RestoreIndex; import com.yelp.nrtsearch.server.grpc.StartIndexRequest; import com.yelp.nrtsearch.server.grpc.StartIndexResponse; -import com.yelp.nrtsearch.server.luceneserver.handler.Handler.HandlerException; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; +import com.yelp.nrtsearch.server.handler.Handler.HandlerException; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; import java.io.IOException; import java.util.HashSet; import java.util.Set; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/innerhit/InnerHitContext.java b/src/main/java/com/yelp/nrtsearch/server/innerhit/InnerHitContext.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/innerhit/InnerHitContext.java rename to src/main/java/com/yelp/nrtsearch/server/innerhit/InnerHitContext.java index 5725edcfd..87fb02789 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/innerhit/InnerHitContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/innerhit/InnerHitContext.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.innerhit; +package com.yelp.nrtsearch.server.innerhit; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.LastHitInfo; import com.yelp.nrtsearch.server.grpc.QuerySortField; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.highlights.HighlightFetchTask; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks; -import com.yelp.nrtsearch.server.luceneserver.search.FieldFetchContext; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortContext; +import com.yelp.nrtsearch.server.highlights.HighlightFetchTask; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.search.FetchTasks; +import com.yelp.nrtsearch.server.search.FieldFetchContext; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.sort.SortContext; import java.io.IOException; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/innerhit/InnerHitFetchTask.java b/src/main/java/com/yelp/nrtsearch/server/innerhit/InnerHitFetchTask.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/innerhit/InnerHitFetchTask.java rename to src/main/java/com/yelp/nrtsearch/server/innerhit/InnerHitFetchTask.java index 59f4751f5..1f2834707 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/innerhit/InnerHitFetchTask.java +++ b/src/main/java/com/yelp/nrtsearch/server/innerhit/InnerHitFetchTask.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.innerhit; +package com.yelp.nrtsearch.server.innerhit; import com.yelp.nrtsearch.server.grpc.HitsResult; import com.yelp.nrtsearch.server.grpc.SearchResponse; @@ -21,10 +21,10 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics.Builder; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.TotalHits; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortParser; +import com.yelp.nrtsearch.server.handler.SearchHandler; +import com.yelp.nrtsearch.server.search.FetchTasks.FetchTask; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.sort.SortParser; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLogger.java b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLogger.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLogger.java rename to src/main/java/com/yelp/nrtsearch/server/logging/HitsLogger.java index c37b146d6..509aa7766 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLogger.java +++ b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLogger.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.logging; +package com.yelp.nrtsearch.server.logging; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchContext; import java.util.List; /** diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerCreator.java b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerCreator.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerCreator.java rename to src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerCreator.java index 95fbce1e6..cf0fefb92 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerCreator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.logging; +package com.yelp.nrtsearch.server.logging; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.LoggingHits; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerFetchTask.java b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerFetchTask.java similarity index 88% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerFetchTask.java rename to src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerFetchTask.java index 2c279f5eb..283e5e238 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerFetchTask.java +++ b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerFetchTask.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.logging; +package com.yelp.nrtsearch.server.logging; import com.yelp.nrtsearch.server.grpc.LoggingHits; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; import com.yelp.nrtsearch.server.plugins.HitsLoggerPlugin; +import com.yelp.nrtsearch.server.search.FetchTasks.FetchTask; +import com.yelp.nrtsearch.server.search.SearchContext; import java.util.List; /** diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerProvider.java b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerProvider.java similarity index 88% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerProvider.java rename to src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerProvider.java index 3b9265260..8730bce5f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/logging/HitsLoggerProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.logging; +package com.yelp.nrtsearch.server.logging; import com.yelp.nrtsearch.server.grpc.LoggingHits; import java.util.Map; @@ -29,7 +29,7 @@ public interface HitsLoggerProvider { * Get task instance with the given parameters. * * @param params java native representation of {@link LoggingHits#getParams()} - * @return {@link com.yelp.nrtsearch.server.luceneserver.logging.HitsLogger} instance + * @return {@link HitsLogger} instance */ T get(Map params); } diff --git a/src/main/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollector.java b/src/main/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollector.java index 81977c15b..8eaccfb36 100644 --- a/src/main/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollector.java @@ -16,7 +16,7 @@ package com.yelp.nrtsearch.server.monitoring; import com.google.common.annotations.VisibleForTesting; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.prometheus.metrics.core.metrics.Gauge; import io.prometheus.metrics.model.registry.MultiCollector; import io.prometheus.metrics.model.snapshots.MetricSnapshot; diff --git a/src/main/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollector.java b/src/main/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollector.java index 4ff9683f3..8bfb91f55 100644 --- a/src/main/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollector.java @@ -16,7 +16,7 @@ package com.yelp.nrtsearch.server.monitoring; import com.google.common.annotations.VisibleForTesting; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.prometheus.metrics.core.metrics.Gauge; import io.prometheus.metrics.model.registry.MultiCollector; import io.prometheus.metrics.model.snapshots.MetricSnapshot; diff --git a/src/main/java/com/yelp/nrtsearch/server/monitoring/QueryCacheCollector.java b/src/main/java/com/yelp/nrtsearch/server/monitoring/QueryCacheCollector.java index 7c645b2ce..fb2881974 100644 --- a/src/main/java/com/yelp/nrtsearch/server/monitoring/QueryCacheCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/monitoring/QueryCacheCollector.java @@ -15,7 +15,7 @@ */ package com.yelp.nrtsearch.server.monitoring; -import com.yelp.nrtsearch.server.luceneserver.search.cache.NrtQueryCache; +import com.yelp.nrtsearch.server.search.cache.NrtQueryCache; import io.prometheus.metrics.core.metrics.Gauge; import io.prometheus.metrics.model.registry.MultiCollector; import io.prometheus.metrics.model.snapshots.MetricSnapshot; diff --git a/src/main/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollector.java b/src/main/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollector.java index 4b44fe086..0caae82d2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollector.java @@ -18,7 +18,7 @@ import com.google.common.annotations.VisibleForTesting; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.prometheus.metrics.core.metrics.Counter; import io.prometheus.metrics.core.metrics.Summary; import io.prometheus.metrics.model.registry.MultiCollector; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/DefaultCopyThread.java b/src/main/java/com/yelp/nrtsearch/server/nrt/DefaultCopyThread.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/DefaultCopyThread.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/DefaultCopyThread.java index ee09d5b6e..bca4b3ee7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/DefaultCopyThread.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/DefaultCopyThread.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import java.util.PriorityQueue; import org.apache.lucene.replicator.nrt.CopyJob; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NRTPrimaryNode.java b/src/main/java/com/yelp/nrtsearch/server/nrt/NRTPrimaryNode.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NRTPrimaryNode.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/NRTPrimaryNode.java index f534c559a..02126728c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NRTPrimaryNode.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/NRTPrimaryNode.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import com.yelp.nrtsearch.server.grpc.FilesMetadata; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; import com.yelp.nrtsearch.server.grpc.TransferStatus; -import com.yelp.nrtsearch.server.luceneserver.handler.RecvCopyStateHandler; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; +import com.yelp.nrtsearch.server.handler.RecvCopyStateHandler; +import com.yelp.nrtsearch.server.index.IndexStateManager; import com.yelp.nrtsearch.server.monitoring.NrtMetrics; import com.yelp.nrtsearch.server.utils.HostPort; import io.grpc.Deadline; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NRTReplicaNode.java b/src/main/java/com/yelp/nrtsearch/server/nrt/NRTReplicaNode.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NRTReplicaNode.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/NRTReplicaNode.java index 7bef5125d..25052de94 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NRTReplicaNode.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/NRTReplicaNode.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import com.google.common.annotations.VisibleForTesting; import com.yelp.nrtsearch.server.grpc.FileMetadata; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtCopyThread.java b/src/main/java/com/yelp/nrtsearch/server/nrt/NrtCopyThread.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtCopyThread.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/NrtCopyThread.java index 24be080a1..2aee28c35 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtCopyThread.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/NrtCopyThread.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import java.io.Closeable; import java.util.Locale; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtDataManager.java b/src/main/java/com/yelp/nrtsearch/server/nrt/NrtDataManager.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtDataManager.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/NrtDataManager.java index dc19c0329..e97aca1a4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtDataManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/NrtDataManager.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import com.google.common.annotations.VisibleForTesting; import com.yelp.nrtsearch.server.grpc.RestoreIndex; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtFileMetaData; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtFileMetaData; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.utils.FileUtils; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/ProportionalCopyThread.java b/src/main/java/com/yelp/nrtsearch/server/nrt/ProportionalCopyThread.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/ProportionalCopyThread.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/ProportionalCopyThread.java index a4d81cfa6..5ba8c7299 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/ProportionalCopyThread.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/ProportionalCopyThread.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import java.util.PriorityQueue; import org.apache.lucene.replicator.nrt.CopyJob; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/RefreshUploadFuture.java b/src/main/java/com/yelp/nrtsearch/server/nrt/RefreshUploadFuture.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/RefreshUploadFuture.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/RefreshUploadFuture.java index a16099034..2fd19238a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/RefreshUploadFuture.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/RefreshUploadFuture.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/SimpleCopyJob.java b/src/main/java/com/yelp/nrtsearch/server/nrt/SimpleCopyJob.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/SimpleCopyJob.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/SimpleCopyJob.java index 56114214a..c634ce32c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/SimpleCopyJob.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/SimpleCopyJob.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import com.yelp.nrtsearch.server.grpc.FileInfo; import com.yelp.nrtsearch.server.grpc.RawFileChunk; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtFileMetaData.java b/src/main/java/com/yelp/nrtsearch/server/nrt/state/NrtFileMetaData.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtFileMetaData.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/state/NrtFileMetaData.java index 30ee3fde0..ac301f2fa 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtFileMetaData.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/state/NrtFileMetaData.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt.state; +package com.yelp.nrtsearch.server.nrt.state; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; @@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtFileMetaData.NrtFileMetaDataDeserializer; +import com.yelp.nrtsearch.server.nrt.state.NrtFileMetaData.NrtFileMetaDataDeserializer; import java.io.IOException; import java.util.Arrays; import java.util.Objects; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtPointState.java b/src/main/java/com/yelp/nrtsearch/server/nrt/state/NrtPointState.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtPointState.java rename to src/main/java/com/yelp/nrtsearch/server/nrt/state/NrtPointState.java index 0c6fa0ff9..8354936d1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtPointState.java +++ b/src/main/java/com/yelp/nrtsearch/server/nrt/state/NrtPointState.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt.state; +package com.yelp.nrtsearch.server.nrt.state; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/AnalysisPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/AnalysisPlugin.java index 8680b3670..93e2c356d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/AnalysisPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/AnalysisPlugin.java @@ -15,7 +15,9 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.analysis.AnalysisProvider; +import com.yelp.nrtsearch.server.analysis.AnalysisComponent; +import com.yelp.nrtsearch.server.analysis.AnalysisProvider; +import com.yelp.nrtsearch.server.analysis.AnalyzerCreator; import java.util.Collections; import java.util.Map; import org.apache.lucene.analysis.Analyzer; @@ -34,9 +36,8 @@ public interface AnalysisPlugin { /** - * Provides a set of custom {@link Analyzer} to register with the {@link - * com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator}. The analyzer name can be used - * as the predefined AnalyzerType in gRPC requests. + * Provides a set of custom {@link Analyzer} to register with the {@link AnalyzerCreator}. The + * analyzer name can be used as the predefined AnalyzerType in gRPC requests. * * @return registration Map for analyzer name to {@link AnalysisProvider} */ @@ -46,12 +47,10 @@ default Map> getAnalyzers() { /** * Provides a set of custom {@link TokenFilterFactory} classes to register with the {@link - * com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator} for use with {@link - * com.yelp.nrtsearch.server.grpc.CustomAnalyzer} building. + * AnalyzerCreator} for use with {@link com.yelp.nrtsearch.server.grpc.CustomAnalyzer} building. * *

The class must have a constructor that takes only a param Map[String,String]. If nrtsearch - * specific context is required, implement the {@link - * com.yelp.nrtsearch.server.luceneserver.analysis.AnalysisComponent} interface to receive + * specific context is required, implement the {@link AnalysisComponent} interface to receive * additional initialization during building. * * @return registration Map for token filter name to {@link TokenFilterFactory} class @@ -62,12 +61,10 @@ default Map> getTokenFilters() { /** * Provides a set of custom {@link CharFilterFactory} classes to register with the {@link - * com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator} for use with {@link - * com.yelp.nrtsearch.server.grpc.CustomAnalyzer} building. + * AnalyzerCreator} for use with {@link com.yelp.nrtsearch.server.grpc.CustomAnalyzer} building. * *

The class must have a constructor that takes only a param Map[String,String]. If nrtsearch - * specific context is required, implement the {@link - * com.yelp.nrtsearch.server.luceneserver.analysis.AnalysisComponent} interface to receive + * specific context is required, implement the {@link AnalysisComponent} interface to receive * additional initialization during building. * * @return registration Map for char filter name to {@link CharFilterFactory} class diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/CollectorPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/CollectorPlugin.java index a037a90b8..1b1eeb6a5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/CollectorPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/CollectorPlugin.java @@ -16,8 +16,8 @@ package com.yelp.nrtsearch.server.plugins; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorProvider; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorProvider; import java.util.Collections; import java.util.Map; import org.apache.lucene.search.Collector; diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/FetchTaskPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/FetchTaskPlugin.java index 09d10233c..ab0e58bb7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/FetchTaskPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/FetchTaskPlugin.java @@ -15,8 +15,8 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTaskProvider; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks; +import com.yelp.nrtsearch.server.search.FetchTaskProvider; +import com.yelp.nrtsearch.server.search.FetchTasks; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/FieldTypePlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/FieldTypePlugin.java index bd6ede507..96d95a5a3 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/FieldTypePlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/FieldTypePlugin.java @@ -15,8 +15,8 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefProvider; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDefProvider; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/HighlighterPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/HighlighterPlugin.java index f15b7d89f..e63bf4272 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/HighlighterPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/HighlighterPlugin.java @@ -15,7 +15,8 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.highlights.Highlighter; +import com.yelp.nrtsearch.server.highlights.Highlighter; +import com.yelp.nrtsearch.server.highlights.HighlighterService; import java.util.Collections; /** @@ -27,7 +28,7 @@ public interface HighlighterPlugin { /** * Provides custom {@link Highlighter} implementations for registration with the {@link - * com.yelp.nrtsearch.server.luceneserver.highlights.HighlighterService}. + * HighlighterService}. * * @return list of provided {@link Highlighter} implementations */ diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/HitsLoggerPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/HitsLoggerPlugin.java index d84421712..9c1764d51 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/HitsLoggerPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/HitsLoggerPlugin.java @@ -15,8 +15,8 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.logging.HitsLogger; -import com.yelp.nrtsearch.server.luceneserver.logging.HitsLoggerProvider; +import com.yelp.nrtsearch.server.logging.HitsLogger; +import com.yelp.nrtsearch.server.logging.HitsLoggerProvider; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/RescorerPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/RescorerPlugin.java index a9668ce90..6abdf7d58 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/RescorerPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/RescorerPlugin.java @@ -15,8 +15,8 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescoreOperation; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescorerProvider; +import com.yelp.nrtsearch.server.rescore.RescoreOperation; +import com.yelp.nrtsearch.server.rescore.RescorerProvider; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/ScriptPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/ScriptPlugin.java index 877d36e39..3f225b2fc 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/ScriptPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/ScriptPlugin.java @@ -15,8 +15,9 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; +import com.yelp.nrtsearch.server.script.ScriptService; import java.util.Collections; import java.util.List; @@ -29,8 +30,8 @@ public interface ScriptPlugin { /** * Provides custom {@link ScriptEngine} implementations for registration with the {@link - * com.yelp.nrtsearch.server.luceneserver.script.ScriptService}. The service delegates compilation - * of the script source to the appropriate engine based on the specified language. + * ScriptService}. The service delegates compilation of the script source to the appropriate + * engine based on the specified language. * * @param contexts list of possible script context types * @return list of provided {@link ScriptEngine} implementations diff --git a/src/main/java/com/yelp/nrtsearch/server/plugins/SimilarityPlugin.java b/src/main/java/com/yelp/nrtsearch/server/plugins/SimilarityPlugin.java index 1db55b089..5f988f6e2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/plugins/SimilarityPlugin.java +++ b/src/main/java/com/yelp/nrtsearch/server/plugins/SimilarityPlugin.java @@ -15,7 +15,7 @@ */ package com.yelp.nrtsearch.server.plugins; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityProvider; +import com.yelp.nrtsearch.server.similarity.SimilarityProvider; import java.util.Collections; import java.util.Map; import org.apache.lucene.search.similarities.Similarity; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/BlendedTermQuery.java b/src/main/java/com/yelp/nrtsearch/server/query/BlendedTermQuery.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/BlendedTermQuery.java rename to src/main/java/com/yelp/nrtsearch/server/query/BlendedTermQuery.java index a1eef819f..95c825d87 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/BlendedTermQuery.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/BlendedTermQuery.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchCrossFieldsQuery.java b/src/main/java/com/yelp/nrtsearch/server/query/MatchCrossFieldsQuery.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchCrossFieldsQuery.java rename to src/main/java/com/yelp/nrtsearch/server/query/MatchCrossFieldsQuery.java index 781156c28..befd1b685 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchCrossFieldsQuery.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/MatchCrossFieldsQuery.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import com.yelp.nrtsearch.server.grpc.MatchOperator; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchPhrasePrefixQuery.java b/src/main/java/com/yelp/nrtsearch/server/query/MatchPhrasePrefixQuery.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchPhrasePrefixQuery.java rename to src/main/java/com/yelp/nrtsearch/server/query/MatchPhrasePrefixQuery.java index 8b5d972d5..15d42a4a2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchPhrasePrefixQuery.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/MatchPhrasePrefixQuery.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.isAnalyzerDefined; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.isAnalyzerDefined; -import com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.analysis.AnalyzerCreator; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.index.IndexState; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchQueryBuilder.java b/src/main/java/com/yelp/nrtsearch/server/query/MatchQueryBuilder.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchQueryBuilder.java rename to src/main/java/com/yelp/nrtsearch/server/query/MatchQueryBuilder.java index 84f8d2f6f..301c03c3f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/MatchQueryBuilder.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/MatchQueryBuilder.java @@ -13,9 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; -import static com.yelp.nrtsearch.server.luceneserver.query.QueryUtils.computeMaxEditsFromTermLength; import static org.apache.lucene.search.BoostAttribute.DEFAULT_BOOST; import com.yelp.nrtsearch.server.grpc.FuzzyParams; @@ -46,7 +45,7 @@ public MatchQueryBuilder(Analyzer analyzer, FuzzyParams fuzzyParams) { @Override protected Query newTermQuery(Term term, float boost) { if (fuzzyParams.hasAuto()) { - maxEdits = computeMaxEditsFromTermLength(term, fuzzyParams.getAuto()); + maxEdits = QueryUtils.computeMaxEditsFromTermLength(term, fuzzyParams.getAuto()); } if (maxEdits == 0) { return super.newTermQuery(term, boost); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/QueryNodeMapper.java b/src/main/java/com/yelp/nrtsearch/server/query/QueryNodeMapper.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/QueryNodeMapper.java rename to src/main/java/com/yelp/nrtsearch/server/query/QueryNodeMapper.java index edfeb5f5b..d8d9201b0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/QueryNodeMapper.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/QueryNodeMapper.java @@ -13,11 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; - -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.isAnalyzerDefined; -import static com.yelp.nrtsearch.server.luceneserver.query.QueryUtils.computeMaxEditsFromTermLength; - +package com.yelp.nrtsearch.server.query; + +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.isAnalyzerDefined; + +import com.yelp.nrtsearch.server.analysis.AnalyzerCreator; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.field.properties.GeoQueryable; +import com.yelp.nrtsearch.server.field.properties.PolygonQueryable; +import com.yelp.nrtsearch.server.field.properties.RangeQueryable; +import com.yelp.nrtsearch.server.field.properties.TermQueryable; import com.yelp.nrtsearch.server.grpc.ExistsQuery; import com.yelp.nrtsearch.server.grpc.FunctionFilterQuery; import com.yelp.nrtsearch.server.grpc.GeoBoundingBoxQuery; @@ -32,19 +40,10 @@ import com.yelp.nrtsearch.server.grpc.PrefixQuery; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.RewriteMethod; -import com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GeoQueryable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.PolygonQueryable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.RangeQueryable; -import com.yelp.nrtsearch.server.luceneserver.field.properties.TermQueryable; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.query.multifunction.MultiFunctionScoreQuery; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.query.multifunction.MultiFunctionScoreQuery; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptService; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import java.util.ArrayList; import java.util.Arrays; @@ -733,7 +732,7 @@ private static FuzzyQuery getFuzzyQuery( int maxEdits = FuzzyQuery.defaultMaxEdits; if (protoFuzzyQuery.hasAuto()) { - maxEdits = computeMaxEditsFromTermLength(term, protoFuzzyQuery.getAuto()); + maxEdits = QueryUtils.computeMaxEditsFromTermLength(term, protoFuzzyQuery.getAuto()); } else { if (protoFuzzyQuery.hasMaxEdits()) { maxEdits = protoFuzzyQuery.getMaxEdits(); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/QueryUtils.java b/src/main/java/com/yelp/nrtsearch/server/query/QueryUtils.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/QueryUtils.java rename to src/main/java/com/yelp/nrtsearch/server/query/QueryUtils.java index 5b2aaf7b0..12c98dbe7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/QueryUtils.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/QueryUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import com.yelp.nrtsearch.server.grpc.FuzzyParams; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/DecayFilterFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/DecayFilterFunction.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/DecayFilterFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/DecayFilterFunction.java index 006707d65..44bbab780 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/DecayFilterFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/DecayFilterFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery; import org.apache.lucene.search.Query; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/DecayFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/DecayFunction.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/DecayFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/DecayFunction.java index 0a88721eb..d57695651 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/DecayFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/DecayFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import org.apache.lucene.search.Explanation; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/ExponentialDecayFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/ExponentialDecayFunction.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/ExponentialDecayFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/ExponentialDecayFunction.java index cf37415bb..2889ac661 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/ExponentialDecayFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/ExponentialDecayFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import org.apache.lucene.search.Explanation; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/FilterFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/FilterFunction.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/FilterFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/FilterFunction.java index 014fa9365..f29e7f6a6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/FilterFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/FilterFunction.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptService; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import java.io.IOException; import java.util.Objects; @@ -32,9 +32,9 @@ /** * Function base class used by {@link - * com.yelp.nrtsearch.server.luceneserver.query.multifunction.MultiFunctionScoreQuery}. Can - * optionally have a filter {@link Query} to apply this function only to those matching docs. - * Functions may also specify a weight to scale the result. + * com.yelp.nrtsearch.server.query.multifunction.MultiFunctionScoreQuery}. Can optionally have a + * filter {@link Query} to apply this function only to those matching docs. Functions may also + * specify a weight to scale the result. */ public abstract class FilterFunction { private final Query filterQuery; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/GeoPointDecayFilterFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/GeoPointDecayFilterFunction.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/GeoPointDecayFilterFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/GeoPointDecayFilterFunction.java index 47f9eb289..070ac870c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/GeoPointDecayFilterFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/GeoPointDecayFilterFunction.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import com.google.type.LatLng; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.doc.SegmentDocLookup; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.LatLonFieldDef; +import com.yelp.nrtsearch.server.geo.GeoPoint; +import com.yelp.nrtsearch.server.geo.GeoUtils; import com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.doc.SegmentDocLookup; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.LatLonFieldDef; -import com.yelp.nrtsearch.server.luceneserver.geo.GeoPoint; -import com.yelp.nrtsearch.server.luceneserver.geo.GeoUtils; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexState; import java.io.IOException; import java.util.List; import java.util.Objects; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/GuassianDecayFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/GuassianDecayFunction.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/GuassianDecayFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/GuassianDecayFunction.java index 2d437139d..dc4aea9a2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/GuassianDecayFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/GuassianDecayFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import org.apache.lucene.search.Explanation; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/LinearDecayFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/LinearDecayFunction.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/LinearDecayFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/LinearDecayFunction.java index 7dee96c88..da1897bf3 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/LinearDecayFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/LinearDecayFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import org.apache.lucene.search.Explanation; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/MultiFunctionScoreQuery.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/MultiFunctionScoreQuery.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/MultiFunctionScoreQuery.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/MultiFunctionScoreQuery.java index 65ba6034c..c256ab843 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/MultiFunctionScoreQuery.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/MultiFunctionScoreQuery.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode; import com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; -import com.yelp.nrtsearch.server.luceneserver.query.QueryUtils; -import com.yelp.nrtsearch.server.luceneserver.query.multifunction.FilterFunction.LeafFunction; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.query.QueryUtils; +import com.yelp.nrtsearch.server.query.multifunction.FilterFunction.LeafFunction; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/ScriptFilterFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/ScriptFilterFunction.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/ScriptFilterFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/ScriptFilterFunction.java index 10239cb3b..d7c52432d 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/ScriptFilterFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/ScriptFilterFunction.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.Script; -import com.yelp.nrtsearch.server.luceneserver.query.QueryUtils; +import com.yelp.nrtsearch.server.query.QueryUtils; +import com.yelp.nrtsearch.server.script.ScoreScript; import java.io.IOException; import java.util.Objects; import org.apache.lucene.index.LeafReaderContext; @@ -28,8 +29,8 @@ import org.apache.lucene.search.Query; /** - * Filter function implementation that produces document values with a provided {@link - * com.yelp.nrtsearch.server.luceneserver.script.ScoreScript} definition. + * Filter function implementation that produces document values with a provided {@link ScoreScript} + * definition. */ public class ScriptFilterFunction extends FilterFunction { private static final JsonFormat.Printer SCRIPT_PRINTER = diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/WeightFilterFunction.java b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/WeightFilterFunction.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/WeightFilterFunction.java rename to src/main/java/com/yelp/nrtsearch/server/query/multifunction/WeightFilterFunction.java index 3f9ec6276..7b2080a9c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/WeightFilterFunction.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/multifunction/WeightFilterFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import java.io.IOException; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/NrtKnnByteVectorQuery.java b/src/main/java/com/yelp/nrtsearch/server/query/vector/NrtKnnByteVectorQuery.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/NrtKnnByteVectorQuery.java rename to src/main/java/com/yelp/nrtsearch/server/query/vector/NrtKnnByteVectorQuery.java index a3c636830..ffed168c5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/NrtKnnByteVectorQuery.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/vector/NrtKnnByteVectorQuery.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.vector; +package com.yelp.nrtsearch.server.query.vector; import org.apache.lucene.search.*; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/NrtKnnFloatVectorQuery.java b/src/main/java/com/yelp/nrtsearch/server/query/vector/NrtKnnFloatVectorQuery.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/NrtKnnFloatVectorQuery.java rename to src/main/java/com/yelp/nrtsearch/server/query/vector/NrtKnnFloatVectorQuery.java index 833f118cc..f77849717 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/NrtKnnFloatVectorQuery.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/vector/NrtKnnFloatVectorQuery.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.vector; +package com.yelp.nrtsearch.server.query.vector; import org.apache.lucene.search.KnnFloatVectorQuery; import org.apache.lucene.search.Query; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/WithVectorTotalHits.java b/src/main/java/com/yelp/nrtsearch/server/query/vector/WithVectorTotalHits.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/WithVectorTotalHits.java rename to src/main/java/com/yelp/nrtsearch/server/query/vector/WithVectorTotalHits.java index 564b0c90e..97ae3afcc 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/query/vector/WithVectorTotalHits.java +++ b/src/main/java/com/yelp/nrtsearch/server/query/vector/WithVectorTotalHits.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.vector; +package com.yelp.nrtsearch.server.query.vector; import org.apache.lucene.search.TotalHits; diff --git a/src/main/java/com/yelp/nrtsearch/server/remote/RemoteBackend.java b/src/main/java/com/yelp/nrtsearch/server/remote/RemoteBackend.java index 000fa4ea8..e503c7a2a 100644 --- a/src/main/java/com/yelp/nrtsearch/server/remote/RemoteBackend.java +++ b/src/main/java/com/yelp/nrtsearch/server/remote/RemoteBackend.java @@ -15,8 +15,8 @@ */ package com.yelp.nrtsearch.server.remote; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtFileMetaData; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtFileMetaData; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; diff --git a/src/main/java/com/yelp/nrtsearch/server/remote/RemoteUtils.java b/src/main/java/com/yelp/nrtsearch/server/remote/RemoteUtils.java index a6e6ff685..8f83b3ea6 100644 --- a/src/main/java/com/yelp/nrtsearch/server/remote/RemoteUtils.java +++ b/src/main/java/com/yelp/nrtsearch/server/remote/RemoteUtils.java @@ -15,8 +15,8 @@ */ package com.yelp.nrtsearch.server.remote; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.state.StateUtils; import com.yelp.nrtsearch.server.utils.JsonUtils; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/remote/s3/S3Backend.java b/src/main/java/com/yelp/nrtsearch/server/remote/s3/S3Backend.java index ad0b3a978..918b47228 100644 --- a/src/main/java/com/yelp/nrtsearch/server/remote/s3/S3Backend.java +++ b/src/main/java/com/yelp/nrtsearch/server/remote/s3/S3Backend.java @@ -31,10 +31,10 @@ import com.amazonaws.services.s3.transfer.Upload; import com.google.common.annotations.VisibleForTesting; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtFileMetaData; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; +import com.yelp.nrtsearch.server.nrt.state.NrtFileMetaData; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.state.StateUtils; import com.yelp.nrtsearch.server.utils.ZipUtils; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/QueryRescore.java b/src/main/java/com/yelp/nrtsearch/server/rescore/QueryRescore.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/QueryRescore.java rename to src/main/java/com/yelp/nrtsearch/server/rescore/QueryRescore.java index 8104871e2..c226dba82 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/QueryRescore.java +++ b/src/main/java/com/yelp/nrtsearch/server/rescore/QueryRescore.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; import java.io.IOException; import org.apache.lucene.search.Query; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreContext.java b/src/main/java/com/yelp/nrtsearch/server/rescore/RescoreContext.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreContext.java rename to src/main/java/com/yelp/nrtsearch/server/rescore/RescoreContext.java index f1bd7ab65..ead0a0c34 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/rescore/RescoreContext.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchContext; /** Class containing additional information a {@link RescoreOperation} can use for rescoring. */ public class RescoreContext { diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreOperation.java b/src/main/java/com/yelp/nrtsearch/server/rescore/RescoreOperation.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreOperation.java rename to src/main/java/com/yelp/nrtsearch/server/rescore/RescoreOperation.java index 473af4cbe..5ffbddfcd 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreOperation.java +++ b/src/main/java/com/yelp/nrtsearch/server/rescore/RescoreOperation.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; import java.io.IOException; import org.apache.lucene.search.TopDocs; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreTask.java b/src/main/java/com/yelp/nrtsearch/server/rescore/RescoreTask.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreTask.java rename to src/main/java/com/yelp/nrtsearch/server/rescore/RescoreTask.java index 3251fc342..31dfd4a59 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescoreTask.java +++ b/src/main/java/com/yelp/nrtsearch/server/rescore/RescoreTask.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.handler.SearchHandler; +import com.yelp.nrtsearch.server.search.SearchContext; import java.io.IOException; import org.apache.lucene.search.TopDocs; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerCreator.java b/src/main/java/com/yelp/nrtsearch/server/rescore/RescorerCreator.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerCreator.java rename to src/main/java/com/yelp/nrtsearch/server/rescore/RescorerCreator.java index 943f1b444..6e4b685b1 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/rescore/RescorerCreator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.PluginRescorer; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerProvider.java b/src/main/java/com/yelp/nrtsearch/server/rescore/RescorerProvider.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerProvider.java rename to src/main/java/com/yelp/nrtsearch/server/rescore/RescorerProvider.java index 8014b23aa..02f6e14c5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/rescore/RescorerProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/FacetScript.java b/src/main/java/com/yelp/nrtsearch/server/script/FacetScript.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/FacetScript.java rename to src/main/java/com/yelp/nrtsearch/server/script/FacetScript.java index 70f17dcd6..4ad244543 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/FacetScript.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/FacetScript.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.doc.SegmentDocLookup; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.doc.SegmentDocLookup; import java.io.IOException; import java.util.Map; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/RuntimeScript.java b/src/main/java/com/yelp/nrtsearch/server/script/RuntimeScript.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/RuntimeScript.java rename to src/main/java/com/yelp/nrtsearch/server/script/RuntimeScript.java index cb2ae7746..87056b257 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/RuntimeScript.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/RuntimeScript.java @@ -13,12 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.doc.SegmentDocLookup; -import com.yelp.nrtsearch.server.luceneserver.script.RuntimeScript.SegmentFactory; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.doc.SegmentDocLookup; import java.io.IOException; import java.util.Map; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScoreScript.java b/src/main/java/com/yelp/nrtsearch/server/script/ScoreScript.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScoreScript.java rename to src/main/java/com/yelp/nrtsearch/server/script/ScoreScript.java index 2a63ffa60..a636b6441 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScoreScript.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/ScoreScript.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.doc.SegmentDocLookup; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.doc.SegmentDocLookup; import java.io.IOException; import java.util.Map; import java.util.Objects; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptContext.java b/src/main/java/com/yelp/nrtsearch/server/script/ScriptContext.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptContext.java rename to src/main/java/com/yelp/nrtsearch/server/script/ScriptContext.java index 1b2b998d1..b9ef8c9e7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/ScriptContext.java @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import java.lang.reflect.Method; import java.util.Arrays; import java.util.List; @@ -67,11 +68,10 @@ * * * Though a stateful factory Class (if required) and instance Class must be provided, it is not - * required that they be used by the {@link ScriptEngine}. For example, the {@link - * com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine} compiles to a Factory that - * produces a {@link org.apache.lucene.search.DoubleValuesSource} directly. This stateful factory - * Class will not conform with the stateful factory contract. Instead, the abstract {@link - * com.yelp.nrtsearch.server.luceneserver.script.ScoreScript.SegmentFactory} is provided as a {@link + * required that they be used by the {@link ScriptEngine}. For example, the {@link JsScriptEngine} + * compiles to a Factory that produces a {@link org.apache.lucene.search.DoubleValuesSource} + * directly. This stateful factory Class will not conform with the stateful factory contract. + * Instead, the abstract {@link ScoreScript.SegmentFactory} is provided as a {@link * org.apache.lucene.search.DoubleValuesSource} which does conform. The same is true for the {@link * ScoreScript}, which is also a {@link org.apache.lucene.search.DoubleValues}. * diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptEngine.java b/src/main/java/com/yelp/nrtsearch/server/script/ScriptEngine.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptEngine.java rename to src/main/java/com/yelp/nrtsearch/server/script/ScriptEngine.java index 3019b4d30..761d46754 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptEngine.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/ScriptEngine.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; /** * Interface for a script engine capable of compiling a language into a factory suitable for the diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptService.java b/src/main/java/com/yelp/nrtsearch/server/script/ScriptService.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptService.java rename to src/main/java/com/yelp/nrtsearch/server/script/ScriptService.java index 7d1914288..d43cde460 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptService.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/ScriptService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; @@ -22,9 +22,9 @@ import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.config.ScriptCacheConfig; import com.yelp.nrtsearch.server.grpc.Script; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptBindings.java b/src/main/java/com/yelp/nrtsearch/server/script/js/JsScriptBindings.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptBindings.java rename to src/main/java/com/yelp/nrtsearch/server/script/js/JsScriptBindings.java index 2016ade59..c0752e7c3 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptBindings.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/js/JsScriptBindings.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script.js; +package com.yelp.nrtsearch.server.script.js; import java.util.Collections; import java.util.HashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptEngine.java b/src/main/java/com/yelp/nrtsearch/server/script/js/JsScriptEngine.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptEngine.java rename to src/main/java/com/yelp/nrtsearch/server/script/js/JsScriptEngine.java index 72f173256..0671a7687 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptEngine.java +++ b/src/main/java/com/yelp/nrtsearch/server/script/js/JsScriptEngine.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script.js; +package com.yelp.nrtsearch.server.script.js; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefBindings; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; +import com.yelp.nrtsearch.server.field.FieldDefBindings; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; import java.text.ParseException; import org.apache.lucene.expressions.Bindings; import org.apache.lucene.expressions.Expression; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskCreator.java b/src/main/java/com/yelp/nrtsearch/server/search/FetchTaskCreator.java similarity index 85% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskCreator.java rename to src/main/java/com/yelp/nrtsearch/server/search/FetchTaskCreator.java index f3335acd8..b823e0bbb 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/FetchTaskCreator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.FetchTask; @@ -23,10 +23,7 @@ import java.util.HashMap; import java.util.Map; -/** - * Factory class that handles registration and creation of {@link - * com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask}s. - */ +/** Factory class that handles registration and creation of {@link FetchTasks.FetchTask}s. */ public class FetchTaskCreator { private static FetchTaskCreator instance; @@ -41,12 +38,11 @@ public class FetchTaskCreator { public FetchTaskCreator(LuceneServerConfiguration configuration) {} /** - * Create a {@link com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask} instance - * given the {@link FetchTask} message from the {@link - * com.yelp.nrtsearch.server.grpc.SearchRequest}. + * Create a {@link FetchTasks.FetchTask} instance given the {@link FetchTask} message from the + * {@link com.yelp.nrtsearch.server.grpc.SearchRequest}. * * @param grpcFetchTask task definition message - * @return {@link com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask} instance + * @return {@link FetchTasks.FetchTask} instance */ public FetchTasks.FetchTask createFetchTask(FetchTask grpcFetchTask) { FetchTaskProvider provider = fetchTaskMap.get(grpcFetchTask.getName()); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskProvider.java b/src/main/java/com/yelp/nrtsearch/server/search/FetchTaskProvider.java similarity index 71% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskProvider.java rename to src/main/java/com/yelp/nrtsearch/server/search/FetchTaskProvider.java index 5605dfe10..7fe5948ff 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/FetchTaskProvider.java @@ -13,16 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import com.yelp.nrtsearch.server.grpc.FetchTask; import java.util.Map; /** - * Interface for providing an instance of a {@link - * com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask}. + * Interface for providing an instance of a {@link FetchTasks.FetchTask}. * - * @param type for {@link com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask} + * @param type for {@link FetchTasks.FetchTask} */ @FunctionalInterface public interface FetchTaskProvider { @@ -30,7 +29,7 @@ public interface FetchTaskProvider { * Get task instance with the given parameters. * * @param params java native representation of {@link FetchTask#getParams()} - * @return {@link com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask} instance + * @return {@link FetchTasks.FetchTask} instance */ T get(Map params); } diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTasks.java b/src/main/java/com/yelp/nrtsearch/server/search/FetchTasks.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTasks.java rename to src/main/java/com/yelp/nrtsearch/server/search/FetchTasks.java index 8623124f3..0e3c0d385 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTasks.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/FetchTasks.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder; -import com.yelp.nrtsearch.server.luceneserver.highlights.HighlightFetchTask; -import com.yelp.nrtsearch.server.luceneserver.innerhit.InnerHitFetchTask; -import com.yelp.nrtsearch.server.luceneserver.logging.HitsLoggerFetchTask; +import com.yelp.nrtsearch.server.highlights.HighlightFetchTask; +import com.yelp.nrtsearch.server.innerhit.InnerHitFetchTask; +import com.yelp.nrtsearch.server.logging.HitsLoggerFetchTask; import java.io.IOException; import java.util.List; import java.util.stream.Collectors; @@ -129,10 +129,7 @@ public FetchTasks( HitsLoggerFetchTask hitsLoggerFetchTask) { taskList = grpcTaskList.stream() - .map( - t -> - com.yelp.nrtsearch.server.luceneserver.search.FetchTaskCreator.getInstance() - .createFetchTask(t)) + .map(t -> FetchTaskCreator.getInstance().createFetchTask(t)) .collect(Collectors.toList()); this.highlightFetchTask = highlightFetchTask; this.innerHitFetchTaskList = innerHitFetchTaskList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FieldFetchContext.java b/src/main/java/com/yelp/nrtsearch/server/search/FieldFetchContext.java similarity index 86% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FieldFetchContext.java rename to src/main/java/com/yelp/nrtsearch/server/search/FieldFetchContext.java index f37abd5c1..22fd31a8c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/FieldFetchContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/FieldFetchContext.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.handler.SearchHandler; import java.util.Map; import org.apache.lucene.facet.taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/GlobalOrdinalLookup.java b/src/main/java/com/yelp/nrtsearch/server/search/GlobalOrdinalLookup.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/GlobalOrdinalLookup.java rename to src/main/java/com/yelp/nrtsearch/server/search/GlobalOrdinalLookup.java index 99ca58bc6..920ff7232 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/GlobalOrdinalLookup.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/GlobalOrdinalLookup.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import java.io.IOException; import org.apache.lucene.index.IndexReader; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcher.java b/src/main/java/com/yelp/nrtsearch/server/search/MyIndexSearcher.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcher.java rename to src/main/java/com/yelp/nrtsearch/server/search/MyIndexSearcher.java index 73ef942bb..43884ee0f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcher.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/MyIndexSearcher.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.apache.lucene.facet.DrillSidewaysQueryCheck.isDrillSidewaysQuery; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/SearchCollectorManager.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/SearchCollectorManager.java index ac38d3fcd..d94a2d6af 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/SearchCollectorManager.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.DocCollector; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.DocCollector; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchContext.java b/src/main/java/com/yelp/nrtsearch/server/search/SearchContext.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchContext.java rename to src/main/java/com/yelp/nrtsearch/server/search/SearchContext.java index 4d8c2698c..aa5b34ea4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/SearchContext.java @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.SharedDocContext; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.doc.SharedDocContext; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescoreTask; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.DocCollector; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.rescore.RescoreTask; +import com.yelp.nrtsearch.server.search.collectors.DocCollector; import java.util.List; import java.util.Map; import java.util.Objects; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCutoffWrapper.java b/src/main/java/com/yelp/nrtsearch/server/search/SearchCutoffWrapper.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCutoffWrapper.java rename to src/main/java/com/yelp/nrtsearch/server/search/SearchCutoffWrapper.java index 12ba52da1..db140a267 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCutoffWrapper.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/SearchCutoffWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchRequestProcessor.java b/src/main/java/com/yelp/nrtsearch/server/search/SearchRequestProcessor.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchRequestProcessor.java rename to src/main/java/com/yelp/nrtsearch/server/search/SearchRequestProcessor.java index 9b17ebb52..3e04a91f0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchRequestProcessor.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/SearchRequestProcessor.java @@ -13,8 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; - +package com.yelp.nrtsearch.server.search; + +import com.yelp.nrtsearch.server.doc.DefaultSharedDocContext; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.RuntimeFieldDef; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; +import com.yelp.nrtsearch.server.field.properties.VectorQueryable; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.Highlight; import com.yelp.nrtsearch.server.grpc.InnerHit; @@ -27,38 +34,31 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.VirtualField; -import com.yelp.nrtsearch.server.luceneserver.doc.DefaultSharedDocContext; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.RuntimeFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.VectorQueryable; -import com.yelp.nrtsearch.server.luceneserver.highlights.HighlightFetchTask; -import com.yelp.nrtsearch.server.luceneserver.highlights.HighlighterService; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.innerhit.InnerHitContext; -import com.yelp.nrtsearch.server.luceneserver.innerhit.InnerHitContext.InnerHitContextBuilder; -import com.yelp.nrtsearch.server.luceneserver.innerhit.InnerHitFetchTask; -import com.yelp.nrtsearch.server.luceneserver.logging.HitsLoggerFetchTask; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; -import com.yelp.nrtsearch.server.luceneserver.query.vector.WithVectorTotalHits; -import com.yelp.nrtsearch.server.luceneserver.rescore.QueryRescore; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescoreOperation; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescoreTask; -import com.yelp.nrtsearch.server.luceneserver.rescore.RescorerCreator; -import com.yelp.nrtsearch.server.luceneserver.script.RuntimeScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreator; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.DocCollector; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.HitCountCollector; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.MyTopSuggestDocsCollector; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.RelevanceCollector; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.SortFieldCollector; +import com.yelp.nrtsearch.server.highlights.HighlightFetchTask; +import com.yelp.nrtsearch.server.highlights.HighlighterService; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.innerhit.InnerHitContext; +import com.yelp.nrtsearch.server.innerhit.InnerHitContext.InnerHitContextBuilder; +import com.yelp.nrtsearch.server.innerhit.InnerHitFetchTask; +import com.yelp.nrtsearch.server.logging.HitsLoggerFetchTask; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.query.vector.WithVectorTotalHits; +import com.yelp.nrtsearch.server.rescore.QueryRescore; +import com.yelp.nrtsearch.server.rescore.RescoreOperation; +import com.yelp.nrtsearch.server.rescore.RescoreTask; +import com.yelp.nrtsearch.server.rescore.RescorerCreator; +import com.yelp.nrtsearch.server.script.RuntimeScript; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptService; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreator; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.DocCollector; +import com.yelp.nrtsearch.server.search.collectors.HitCountCollector; +import com.yelp.nrtsearch.server.search.collectors.MyTopSuggestDocsCollector; +import com.yelp.nrtsearch.server.search.collectors.RelevanceCollector; +import com.yelp.nrtsearch.server.search.collectors.SortFieldCollector; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchStatsWrapper.java b/src/main/java/com/yelp/nrtsearch/server/search/SearchStatsWrapper.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchStatsWrapper.java rename to src/main/java/com/yelp/nrtsearch/server/search/SearchStatsWrapper.java index 2e3a32838..791a8cd89 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearchStatsWrapper.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/SearchStatsWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import com.yelp.nrtsearch.server.grpc.ProfileResult; import com.yelp.nrtsearch.server.grpc.ProfileResult.CollectorStats; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearcherResult.java b/src/main/java/com/yelp/nrtsearch/server/search/SearcherResult.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearcherResult.java rename to src/main/java/com/yelp/nrtsearch/server/search/SearcherResult.java index 6dc9d7bd7..0b297ddfb 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/SearcherResult.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/SearcherResult.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import com.yelp.nrtsearch.server.grpc.CollectorResult; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/TerminateAfterWrapper.java b/src/main/java/com/yelp/nrtsearch/server/search/TerminateAfterWrapper.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/TerminateAfterWrapper.java rename to src/main/java/com/yelp/nrtsearch/server/search/TerminateAfterWrapper.java index 6b576375e..b5fbac459 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/TerminateAfterWrapper.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/TerminateAfterWrapper.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/cache/NrtQueryCache.java b/src/main/java/com/yelp/nrtsearch/server/search/cache/NrtQueryCache.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/cache/NrtQueryCache.java rename to src/main/java/com/yelp/nrtsearch/server/search/cache/NrtQueryCache.java index 4864c6b90..34790c5fc 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/cache/NrtQueryCache.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/cache/NrtQueryCache.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.cache; +package com.yelp.nrtsearch.server.search.cache; import java.util.function.Predicate; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/AdditionalCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/AdditionalCollectorManager.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/AdditionalCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/AdditionalCollectorManager.java index 4617940dd..1624fbad2 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/AdditionalCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/AdditionalCollectorManager.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchContext; import org.apache.lucene.search.Collector; import org.apache.lucene.search.CollectorManager; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreator.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreator.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreator.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreator.java index 21b47408b..aa12375a4 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreator.java @@ -13,16 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.collectors.BucketOrder; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.Collector; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.PluginCollector; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.*; import com.yelp.nrtsearch.server.plugins.CollectorPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.search.collectors.additional.FilterCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.additional.MaxCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.additional.MinCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.additional.TermsCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.additional.TopHitsCollectorManager; import com.yelp.nrtsearch.server.utils.StructValueTransformer; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreatorContext.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreatorContext.java similarity index 88% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreatorContext.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreatorContext.java index 76bb0c27d..f676cda4b 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreatorContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreatorContext.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.SearchRequest; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.search.SearchContext; import java.util.Map; import org.apache.lucene.facet.taxonomy.SearcherTaxonomyManager.SearcherAndTaxonomy; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorProvider.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorProvider.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorProvider.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorProvider.java index 36c45ebd9..450963616 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/CollectorProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.PluginCollector; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/DocCollector.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/DocCollector.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/DocCollector.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/DocCollector.java index e246742cb..d170f3999 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/DocCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/DocCollector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.Facet; @@ -21,14 +21,14 @@ import com.yelp.nrtsearch.server.grpc.Rescorer; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCutoffWrapper; -import com.yelp.nrtsearch.server.luceneserver.search.SearchStatsWrapper; -import com.yelp.nrtsearch.server.luceneserver.search.SearcherResult; -import com.yelp.nrtsearch.server.luceneserver.search.TerminateAfterWrapper; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.CollectorStatsWrapper; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.search.SearchCollectorManager; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchCutoffWrapper; +import com.yelp.nrtsearch.server.search.SearchStatsWrapper; +import com.yelp.nrtsearch.server.search.SearcherResult; +import com.yelp.nrtsearch.server.search.TerminateAfterWrapper; +import com.yelp.nrtsearch.server.search.collectors.additional.CollectorStatsWrapper; import java.util.ArrayList; import java.util.List; import org.apache.lucene.search.Collector; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/HitCountCollector.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/HitCountCollector.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/HitCountCollector.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/HitCountCollector.java index 1ecf10266..4f4c0d224 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/HitCountCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/HitCountCollector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/MyTopSuggestDocsCollector.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/MyTopSuggestDocsCollector.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/MyTopSuggestDocsCollector.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/MyTopSuggestDocsCollector.java index a6228ca2c..5d4b97312 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/MyTopSuggestDocsCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/MyTopSuggestDocsCollector.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.LastHitInfo; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/RelevanceCollector.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/RelevanceCollector.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/RelevanceCollector.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/RelevanceCollector.java index d83987240..ffa9b6bfb 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/RelevanceCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/RelevanceCollector.java @@ -13,13 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; - -import static com.yelp.nrtsearch.server.luceneserver.search.SearchRequestProcessor.TOTAL_HITS_THRESHOLD; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.LastHitInfo; import com.yelp.nrtsearch.server.grpc.SearchResponse; +import com.yelp.nrtsearch.server.search.SearchRequestProcessor; import java.util.List; import org.apache.lucene.search.Collector; import org.apache.lucene.search.CollectorManager; @@ -43,7 +42,7 @@ public RelevanceCollector( super(context, additionalCollectors); FieldDoc searchAfter = null; int topHits = getNumHitsToCollect(); - int totalHitsThreshold = TOTAL_HITS_THRESHOLD; + int totalHitsThreshold = SearchRequestProcessor.TOTAL_HITS_THRESHOLD; // if there are additional collectors, we cannot skip any recalled docs if (!additionalCollectors.isEmpty()) { totalHitsThreshold = Integer.MAX_VALUE; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/SortFieldCollector.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/SortFieldCollector.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/SortFieldCollector.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/SortFieldCollector.java index fcb45a551..48306a0b5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/SortFieldCollector.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/SortFieldCollector.java @@ -13,15 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; - -import static com.yelp.nrtsearch.server.luceneserver.search.SearchRequestProcessor.TOTAL_HITS_THRESHOLD; +package com.yelp.nrtsearch.server.search.collectors; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.LastHitInfo; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortContext; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortParser; +import com.yelp.nrtsearch.server.search.SearchRequestProcessor; +import com.yelp.nrtsearch.server.search.sort.SortContext; +import com.yelp.nrtsearch.server.search.sort.SortParser; import java.util.List; import org.apache.lucene.search.Collector; import org.apache.lucene.search.CollectorManager; @@ -47,7 +46,7 @@ public SortFieldCollector( additionalCollectors) { super(context, additionalCollectors); int topHits = getNumHitsToCollect(); - int totalHitsThreshold = TOTAL_HITS_THRESHOLD; + int totalHitsThreshold = SearchRequestProcessor.TOTAL_HITS_THRESHOLD; FieldDoc searchAfter = null; LastHitInfo lastHitInfo = context.getRequest().getSearchAfter(); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/CollectorStatsWrapper.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/CollectorStatsWrapper.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/CollectorStatsWrapper.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/CollectorStatsWrapper.java index 0da59a8a5..02b3827de 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/CollectorStatsWrapper.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/CollectorStatsWrapper.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.ProfileResult; import com.yelp.nrtsearch.server.grpc.ProfileResult.AdditionalCollectorStats; import com.yelp.nrtsearch.server.grpc.ProfileResult.CollectorStats; import com.yelp.nrtsearch.server.grpc.ProfileResult.SearchStats; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/DoubleTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/DoubleTermsCollectorManager.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/DoubleTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/DoubleTermsCollectorManager.java index 278cd9a3e..16406f39f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/DoubleTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/DoubleTermsCollectorManager.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; import it.unimi.dsi.fastutil.doubles.Double2IntMap; import it.unimi.dsi.fastutil.doubles.Double2IntMaps; import it.unimi.dsi.fastutil.doubles.Double2IntOpenHashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FilterCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/FilterCollectorManager.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FilterCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/FilterCollectorManager.java index 27d172266..6d01ad946 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FilterCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/FilterCollectorManager.java @@ -13,20 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.FilterResult; import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.TermInSetQuery; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.query.QueryNodeMapper; -import com.yelp.nrtsearch.server.luceneserver.query.QueryUtils; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.query.QueryNodeMapper; +import com.yelp.nrtsearch.server.query.QueryUtils; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FloatTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/FloatTermsCollectorManager.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FloatTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/FloatTermsCollectorManager.java index 3346d4e83..b0b388c36 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FloatTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/FloatTermsCollectorManager.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; import it.unimi.dsi.fastutil.floats.Float2IntMap; import it.unimi.dsi.fastutil.floats.Float2IntMaps; import it.unimi.dsi.fastutil.floats.Float2IntOpenHashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/IntTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/IntTermsCollectorManager.java similarity index 86% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/IntTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/IntTermsCollectorManager.java index 4234725d3..980be781e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/IntTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/IntTermsCollectorManager.java @@ -13,17 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntMaps; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; @@ -75,7 +73,7 @@ public TermsCollector newCollector() throws IOException { public CollectorResult reduce(Collection collectors) throws IOException { Int2IntMap combinedCounts = combineCounts(collectors); BucketResult.Builder bucketBuilder = BucketResult.newBuilder(); - Collection nestedCollectors; + Collection nestedCollectors; if (hasNestedCollectors()) { nestedCollectors = collectors.stream().map(TermsCollector::getNestedCollectors).collect(Collectors.toList()); @@ -122,11 +120,11 @@ public ScoreMode implementationScoreMode() { /** Leaf Collector implementation to record term counts from Integer {@link LoadedDocValues}. */ public class TermsLeafCollector implements LeafCollector { final LoadedDocValues docValues; - final NestedLeafCollectors nestedLeafCollectors; + final NestedCollectorManagers.NestedCollectors.NestedLeafCollectors nestedLeafCollectors; public TermsLeafCollector(LeafReaderContext leafContext) throws IOException { docValues = (LoadedDocValues) fieldDef.getDocValues(leafContext); - NestedCollectors nestedCollectors = getNestedCollectors(); + NestedCollectorManagers.NestedCollectors nestedCollectors = getNestedCollectors(); if (nestedCollectors != null) { nestedLeafCollectors = nestedCollectors.getLeafCollector(leafContext); } else { diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LeafValueProvider.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/LeafValueProvider.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LeafValueProvider.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/LeafValueProvider.java index c3f7ffeef..b9fc70a85 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LeafValueProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/LeafValueProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import java.io.IOException; import org.apache.lucene.search.Scorable; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LongTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/LongTermsCollectorManager.java similarity index 86% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LongTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/LongTermsCollectorManager.java index 68b9871b9..414b63348 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LongTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/LongTermsCollectorManager.java @@ -13,17 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import it.unimi.dsi.fastutil.longs.Long2IntMap; import it.unimi.dsi.fastutil.longs.Long2IntMaps; import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap; @@ -75,7 +73,7 @@ public TermsCollector newCollector() throws IOException { public CollectorResult reduce(Collection collectors) throws IOException { Long2IntMap combinedCounts = combineCounts(collectors); BucketResult.Builder bucketBuilder = BucketResult.newBuilder(); - Collection nestedCollectors; + Collection nestedCollectors; if (hasNestedCollectors()) { nestedCollectors = collectors.stream().map(TermsCollector::getNestedCollectors).collect(Collectors.toList()); @@ -123,11 +121,11 @@ public ScoreMode implementationScoreMode() { /** Leaf Collector implementation to record term counts from Long {@link LoadedDocValues}. */ public class TermsLeafCollector implements LeafCollector { final LoadedDocValues docValues; - final NestedLeafCollectors nestedLeafCollectors; + final NestedCollectorManagers.NestedCollectors.NestedLeafCollectors nestedLeafCollectors; public TermsLeafCollector(LeafReaderContext leafContext) throws IOException { docValues = (LoadedDocValues) fieldDef.getDocValues(leafContext); - NestedCollectors nestedCollectors = getNestedCollectors(); + NestedCollectorManagers.NestedCollectors nestedCollectors = getNestedCollectors(); if (nestedCollectors != null) { nestedLeafCollectors = nestedCollectors.getLeafCollector(leafContext); } else { diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MaxCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/MaxCollectorManager.java similarity index 89% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MaxCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/MaxCollectorManager.java index 6720379a8..bc2e13374 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MaxCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/MaxCollectorManager.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.google.protobuf.DoubleValue; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.MaxCollectorManager.MaxCollector; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.additional.MaxCollectorManager.MaxCollector; import java.io.IOException; import java.util.Collection; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MinCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/MinCollectorManager.java similarity index 92% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MinCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/MinCollectorManager.java index 87afbab2f..8bf9d5cc8 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MinCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/MinCollectorManager.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.google.protobuf.DoubleValue; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import java.io.IOException; import java.util.Collection; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectorManagers.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectorManagers.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectorManagers.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectorManagers.java index cd8500aff..beed29996 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectorManagers.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectorManagers.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import java.io.IOException; import java.util.Collection; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/OrdinalTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/OrdinalTermsCollectorManager.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/OrdinalTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/OrdinalTermsCollectorManager.java index d4d0a820b..bcb6c0d98 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/OrdinalTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/OrdinalTermsCollectorManager.java @@ -13,20 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.apache.lucene.index.SortedSetDocValues.NO_MORE_ORDS; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; import it.unimi.dsi.fastutil.longs.Long2IntMap; import it.unimi.dsi.fastutil.longs.Long2IntMaps; import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptTermsCollectorManager.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptTermsCollectorManager.java index 4daa6f0e6..a3efe06a7 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptTermsCollectorManager.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.TermsCollector.TermsSourceCase; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript.Factory; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.script.FacetScript; +import com.yelp.nrtsearch.server.script.FacetScript.Factory; +import com.yelp.nrtsearch.server.script.ScriptService; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMaps; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptValueProvider.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptValueProvider.java similarity index 88% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptValueProvider.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptValueProvider.java index d83e8917b..948b7b979 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptValueProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptValueProvider.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; +import com.yelp.nrtsearch.server.doc.DocLookup; import com.yelp.nrtsearch.server.grpc.Script; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.query.QueryUtils; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; +import com.yelp.nrtsearch.server.query.QueryUtils; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptService; import com.yelp.nrtsearch.server.utils.ScriptParamsUtils; import java.io.IOException; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/StringTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/StringTermsCollectorManager.java similarity index 87% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/StringTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/StringTermsCollectorManager.java index 8343ba874..a98f15795 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/StringTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/StringTermsCollectorManager.java @@ -13,17 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMaps; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; @@ -75,7 +73,7 @@ public TermsCollector newCollector() throws IOException { public CollectorResult reduce(Collection collectors) throws IOException { Object2IntMap combinedCounts = combineCounts(collectors); BucketResult.Builder bucketBuilder = BucketResult.newBuilder(); - Collection nestedCollectors; + Collection nestedCollectors; if (hasNestedCollectors()) { nestedCollectors = collectors.stream().map(TermsCollector::getNestedCollectors).collect(Collectors.toList()); @@ -123,11 +121,11 @@ public ScoreMode implementationScoreMode() { /** Leaf Collector implementation to record term counts from String {@link LoadedDocValues}. */ public class TermsLeafCollector implements LeafCollector { final LoadedDocValues docValues; - final NestedLeafCollectors nestedLeafCollectors; + final NestedCollectorManagers.NestedCollectors.NestedLeafCollectors nestedLeafCollectors; public TermsLeafCollector(LeafReaderContext leafContext) throws IOException { docValues = (LoadedDocValues) fieldDef.getDocValues(leafContext); - NestedCollectors nestedCollectors = getNestedCollectors(); + NestedCollectorManagers.NestedCollectors nestedCollectors = getNestedCollectors(); if (nestedCollectors != null) { nestedLeafCollectors = nestedCollectors.getLeafCollector(leafContext); } else { diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManager.java similarity index 94% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManager.java index 986a11618..fe6e841a5 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManager.java @@ -13,27 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.field.DoubleFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FloatFieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.IntFieldDef; +import com.yelp.nrtsearch.server.field.LongFieldDef; +import com.yelp.nrtsearch.server.field.TextBaseFieldDef; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.BucketOrder.OrderType; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.BucketResult.Bucket; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.field.DoubleFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FloatFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IntFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.LongFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextBaseFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import it.unimi.dsi.fastutil.doubles.Double2IntMap; import it.unimi.dsi.fastutil.floats.Float2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntMap; @@ -234,7 +233,7 @@ public boolean hasNestedCollectors() { /** Common base class for all {@link TermsCollectorManager} {@link Collector}s. */ public abstract class TermsCollector implements Collector { - private final NestedCollectors nestedCollectors; + private final NestedCollectorManagers.NestedCollectors nestedCollectors; protected TermsCollector() { if (nestedCollectorManagers != null) { @@ -251,7 +250,7 @@ protected TermsCollector() { public abstract ScoreMode implementationScoreMode(); /** Get the collector wrapping any nested aggregations. */ - public NestedCollectors getNestedCollectors() { + public NestedCollectorManagers.NestedCollectors getNestedCollectors() { return nestedCollectors; } @@ -293,7 +292,7 @@ public void update(Object key, int count) { void fillBucketResult( BucketResult.Builder bucketBuilder, Object2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { switch (bucketOrder.getValueType()) { case COUNT: @@ -318,7 +317,7 @@ void fillBucketResult( void fillBucketResultByCount( BucketResult.Builder bucketBuilder, Object2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { int size = getSize(); if (counts.size() > 0 && size > 0) { @@ -396,7 +395,7 @@ public void update(int key, int count) { void fillBucketResult( BucketResult.Builder bucketBuilder, Int2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { switch (bucketOrder.getValueType()) { case COUNT: @@ -421,7 +420,7 @@ void fillBucketResult( void fillBucketResultByCount( BucketResult.Builder bucketBuilder, Int2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { int size = getSize(); if (counts.size() > 0 && size > 0) { @@ -499,7 +498,7 @@ public void update(long key, int count) { void fillBucketResult( BucketResult.Builder bucketBuilder, Long2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { switch (bucketOrder.getValueType()) { case COUNT: @@ -524,7 +523,7 @@ void fillBucketResult( void fillBucketResultByCount( BucketResult.Builder bucketBuilder, Long2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { int size = getSize(); if (counts.size() > 0 && size > 0) { @@ -602,7 +601,7 @@ public void update(float key, int count) { void fillBucketResult( BucketResult.Builder bucketBuilder, Float2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { switch (bucketOrder.getValueType()) { case COUNT: @@ -627,7 +626,7 @@ void fillBucketResult( void fillBucketResultByCount( BucketResult.Builder bucketBuilder, Float2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { int size = getSize(); if (counts.size() > 0 && size > 0) { @@ -705,7 +704,7 @@ public void update(double key, int count) { void fillBucketResult( BucketResult.Builder bucketBuilder, Double2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { switch (bucketOrder.getValueType()) { case COUNT: @@ -730,7 +729,7 @@ void fillBucketResult( void fillBucketResultByCount( BucketResult.Builder bucketBuilder, Double2IntMap counts, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { int size = getSize(); if (counts.size() > 0 && size > 0) { @@ -794,7 +793,7 @@ void fillBucketResult( BucketResult.Builder bucketBuilder, Long2IntMap counts, GlobalOrdinalLookup ordinalLookup, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { switch (bucketOrder.getValueType()) { case COUNT: @@ -831,7 +830,7 @@ void fillBucketResultByCount( BucketResult.Builder bucketBuilder, Long2IntMap counts, GlobalOrdinalLookup ordinalLookup, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { int size = getSize(); if (counts.size() > 0 && size > 0) { @@ -922,7 +921,7 @@ private void fillBucketResultByNestedOrder( BucketResult.Builder bucketBuilder, Map counts, Function keyTransform, - Collection nestedCollectors) + Collection nestedCollectors) throws IOException { if (nestedCollectorManagers == null) { throw new IllegalStateException("Collector ordering requires nested collectors"); diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TopHitsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/TopHitsCollectorManager.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TopHitsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/TopHitsCollectorManager.java index fde3977ec..46540075e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TopHitsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/TopHitsCollectorManager.java @@ -13,21 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.CollectorResult; import com.yelp.nrtsearch.server.grpc.HitsResult; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.TotalHits; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks; -import com.yelp.nrtsearch.server.luceneserver.search.FieldFetchContext; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortContext; -import com.yelp.nrtsearch.server.luceneserver.search.sort.SortParser; +import com.yelp.nrtsearch.server.handler.SearchHandler; +import com.yelp.nrtsearch.server.search.FetchTasks; +import com.yelp.nrtsearch.server.search.FieldFetchContext; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.sort.SortContext; +import com.yelp.nrtsearch.server.search.sort.SortParser; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ValueProvider.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ValueProvider.java similarity index 93% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ValueProvider.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ValueProvider.java index 11700e063..b6e284f54 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ValueProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/ValueProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import java.io.IOException; import org.apache.lucene.index.LeafReaderContext; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/VirtualTermsCollectorManager.java b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/VirtualTermsCollectorManager.java similarity index 91% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/VirtualTermsCollectorManager.java rename to src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/VirtualTermsCollectorManager.java index 2f9633419..08973576e 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/VirtualTermsCollectorManager.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/collectors/additional/VirtualTermsCollectorManager.java @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import com.yelp.nrtsearch.server.collectors.BucketOrder; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.CollectorResult; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.AdditionalCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; +import com.yelp.nrtsearch.server.search.collectors.AdditionalCollectorManager; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors; +import com.yelp.nrtsearch.server.search.collectors.additional.NestedCollectorManagers.NestedCollectors.NestedLeafCollectors; import it.unimi.dsi.fastutil.doubles.Double2IntMap; import it.unimi.dsi.fastutil.doubles.Double2IntMaps; import it.unimi.dsi.fastutil.doubles.Double2IntOpenHashMap; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/sort/SortContext.java b/src/main/java/com/yelp/nrtsearch/server/search/sort/SortContext.java similarity index 90% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/sort/SortContext.java rename to src/main/java/com/yelp/nrtsearch/server/search/sort/SortContext.java index e3e38efff..f8f2ee590 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/sort/SortContext.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/sort/SortContext.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.sort; +package com.yelp.nrtsearch.server.search.sort; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.properties.Sortable; import com.yelp.nrtsearch.server.grpc.QuerySortField; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.CompositeFieldValue; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; +import com.yelp.nrtsearch.server.handler.SearchHandler; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/sort/SortParser.java b/src/main/java/com/yelp/nrtsearch/server/search/sort/SortParser.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/search/sort/SortParser.java rename to src/main/java/com/yelp/nrtsearch/server/search/sort/SortParser.java index 5473aa19e..8d4ec4e09 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/search/sort/SortParser.java +++ b/src/main/java/com/yelp/nrtsearch/server/search/sort/SortParser.java @@ -13,16 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.sort; +package com.yelp.nrtsearch.server.search.sort; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.properties.Sortable; import com.yelp.nrtsearch.server.grpc.LastHitInfo; import com.yelp.nrtsearch.server.grpc.QuerySortField; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.CompositeFieldValue; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.Sortable; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; +import com.yelp.nrtsearch.server.handler.SearchHandler; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityCreator.java b/src/main/java/com/yelp/nrtsearch/server/similarity/SimilarityCreator.java similarity index 98% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityCreator.java rename to src/main/java/com/yelp/nrtsearch/server/similarity/SimilarityCreator.java index a24e531c3..4a2203211 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityCreator.java +++ b/src/main/java/com/yelp/nrtsearch/server/similarity/SimilarityCreator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.similarity; +package com.yelp.nrtsearch.server.similarity; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.plugins.Plugin; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityProvider.java b/src/main/java/com/yelp/nrtsearch/server/similarity/SimilarityProvider.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityProvider.java rename to src/main/java/com/yelp/nrtsearch/server/similarity/SimilarityProvider.java index 772dd70e7..b85ba8510 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityProvider.java +++ b/src/main/java/com/yelp/nrtsearch/server/similarity/SimilarityProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.similarity; +package com.yelp.nrtsearch.server.similarity; import java.util.Map; import org.apache.lucene.search.similarities.Similarity; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/BackendGlobalState.java b/src/main/java/com/yelp/nrtsearch/server/state/BackendGlobalState.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/state/BackendGlobalState.java rename to src/main/java/com/yelp/nrtsearch/server/state/BackendGlobalState.java index e51e9fa9a..2f7ebcaaa 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/BackendGlobalState.java +++ b/src/main/java/com/yelp/nrtsearch/server/state/BackendGlobalState.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state; +package com.yelp.nrtsearch.server.state; import static com.yelp.nrtsearch.server.utils.TimeStringUtils.generateTimeStringMs; @@ -32,15 +32,15 @@ import com.yelp.nrtsearch.server.grpc.StartIndexResponse; import com.yelp.nrtsearch.server.grpc.StartIndexV2Request; import com.yelp.nrtsearch.server.grpc.StopIndexRequest; -import com.yelp.nrtsearch.server.luceneserver.index.BackendStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.StartIndexProcessor; -import com.yelp.nrtsearch.server.luceneserver.index.StartIndexProcessor.StartIndexProcessorException; -import com.yelp.nrtsearch.server.luceneserver.state.backend.LocalStateBackend; -import com.yelp.nrtsearch.server.luceneserver.state.backend.RemoteStateBackend; -import com.yelp.nrtsearch.server.luceneserver.state.backend.StateBackend; +import com.yelp.nrtsearch.server.index.BackendStateManager; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.StartIndexProcessor; +import com.yelp.nrtsearch.server.index.StartIndexProcessor.StartIndexProcessorException; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.state.backend.LocalStateBackend; +import com.yelp.nrtsearch.server.state.backend.RemoteStateBackend; +import com.yelp.nrtsearch.server.state.backend.StateBackend; import java.io.IOException; import java.nio.file.Path; import java.util.Collections; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/GlobalState.java b/src/main/java/com/yelp/nrtsearch/server/state/GlobalState.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/state/GlobalState.java rename to src/main/java/com/yelp/nrtsearch/server/state/GlobalState.java index 8566cdc8e..561e6712f 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/GlobalState.java +++ b/src/main/java/com/yelp/nrtsearch/server/state/GlobalState.java @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state; +package com.yelp.nrtsearch.server.state; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.config.ThreadPoolConfiguration; import com.yelp.nrtsearch.server.grpc.CreateIndexRequest; @@ -24,9 +25,8 @@ import com.yelp.nrtsearch.server.grpc.StartIndexResponse; import com.yelp.nrtsearch.server.grpc.StartIndexV2Request; import com.yelp.nrtsearch.server.grpc.StopIndexRequest; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; import com.yelp.nrtsearch.server.remote.RemoteBackend; import java.io.Closeable; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/StateUtils.java b/src/main/java/com/yelp/nrtsearch/server/state/StateUtils.java similarity index 99% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/state/StateUtils.java rename to src/main/java/com/yelp/nrtsearch/server/state/StateUtils.java index b0aea5a5b..d431de3e8 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/StateUtils.java +++ b/src/main/java/com/yelp/nrtsearch/server/state/StateUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state; +package com.yelp.nrtsearch.server.state; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/LocalStateBackend.java b/src/main/java/com/yelp/nrtsearch/server/state/backend/LocalStateBackend.java similarity index 84% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/LocalStateBackend.java rename to src/main/java/com/yelp/nrtsearch/server/state/backend/LocalStateBackend.java index b84421eb8..fdee175c0 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/LocalStateBackend.java +++ b/src/main/java/com/yelp/nrtsearch/server/state/backend/LocalStateBackend.java @@ -13,17 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state.backend; - -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.GLOBAL_STATE_FILE; -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.GLOBAL_STATE_FOLDER; -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.INDEX_STATE_FILE; +package com.yelp.nrtsearch.server.state.backend; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; import com.yelp.nrtsearch.server.grpc.IndexStateInfo; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import java.io.File; import java.io.IOException; import java.nio.file.Path; @@ -46,14 +42,14 @@ public class LocalStateBackend implements StateBackend { public LocalStateBackend(GlobalState globalState) { Objects.requireNonNull(globalState); this.statePath = globalState.getStateDir(); - this.globalStatePath = statePath.resolve(GLOBAL_STATE_FOLDER); + this.globalStatePath = statePath.resolve(StateUtils.GLOBAL_STATE_FOLDER); StateUtils.ensureDirectory(globalStatePath); } @Override public GlobalStateInfo loadOrCreateGlobalState() throws IOException { logger.info("Loading local state"); - Path statePath = globalStatePath.resolve(GLOBAL_STATE_FILE); + Path statePath = globalStatePath.resolve(StateUtils.GLOBAL_STATE_FILE); File stateFile = statePath.toFile(); if (stateFile.isDirectory()) { throw new IllegalStateException("State file: " + stateFile + " is a directory"); @@ -74,7 +70,7 @@ public GlobalStateInfo loadOrCreateGlobalState() throws IOException { public void commitGlobalState(GlobalStateInfo globalStateInfo) throws IOException { Objects.requireNonNull(globalStateInfo); logger.info("Committing global state"); - StateUtils.writeStateToFile(globalStateInfo, globalStatePath, GLOBAL_STATE_FILE); + StateUtils.writeStateToFile(globalStateInfo, globalStatePath, StateUtils.GLOBAL_STATE_FILE); logger.info("Committed state: " + JsonFormat.printer().print(globalStateInfo)); } @@ -84,7 +80,7 @@ public IndexStateInfo loadIndexState(String indexIdentifier) throws IOException logger.info("Loading local state for index: " + indexIdentifier); Path indexStatePath = statePath.resolve(indexIdentifier); StateUtils.ensureDirectory(indexStatePath); - Path statePath = indexStatePath.resolve(INDEX_STATE_FILE); + Path statePath = indexStatePath.resolve(StateUtils.INDEX_STATE_FILE); File stateFile = statePath.toFile(); if (stateFile.isDirectory()) { throw new IllegalStateException("State file: " + stateFile + " is a directory"); @@ -110,7 +106,7 @@ public void commitIndexState(String indexIdentifier, IndexStateInfo indexStateIn Objects.requireNonNull(indexStateInfo); logger.info("Committing state for index: " + indexIdentifier); Path indexStatePath = statePath.resolve(indexIdentifier); - StateUtils.writeIndexStateToFile(indexStateInfo, indexStatePath, INDEX_STATE_FILE); + StateUtils.writeIndexStateToFile(indexStateInfo, indexStatePath, StateUtils.INDEX_STATE_FILE); logger.info("Committed index state: " + JsonFormat.printer().print(indexStateInfo)); } } diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/RemoteStateBackend.java b/src/main/java/com/yelp/nrtsearch/server/state/backend/RemoteStateBackend.java similarity index 87% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/RemoteStateBackend.java rename to src/main/java/com/yelp/nrtsearch/server/state/backend/RemoteStateBackend.java index 4eb437203..74b850175 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/RemoteStateBackend.java +++ b/src/main/java/com/yelp/nrtsearch/server/state/backend/RemoteStateBackend.java @@ -13,21 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state.backend; - -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.GLOBAL_STATE_FILE; -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.GLOBAL_STATE_FOLDER; -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.INDEX_STATE_FILE; -import static com.yelp.nrtsearch.server.luceneserver.state.StateUtils.ensureDirectory; +package com.yelp.nrtsearch.server.state.backend; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.config.StateConfig; import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; import com.yelp.nrtsearch.server.grpc.IndexStateInfo; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; @@ -92,7 +87,7 @@ public RemoteStateBackend(GlobalState globalState) { this.remoteBackend = globalState.getRemoteBackend(); this.serviceName = globalState.getConfiguration().getServiceName(); this.config = RemoteBackendConfig.fromConfig(globalState.getConfiguration()); - this.localFilePath = globalState.getStateDir().resolve(GLOBAL_STATE_FOLDER); + this.localFilePath = globalState.getStateDir().resolve(StateUtils.GLOBAL_STATE_FOLDER); StateUtils.ensureDirectory(localFilePath); } @@ -111,7 +106,7 @@ public GlobalStateInfo loadOrCreateGlobalState() throws IOException { byte[] stateBytes = stateStream.readAllBytes(); // copy restored state to local state directory, not strictly required but ensures a // current copy of the state is always in the local directory - StateUtils.writeToFile(stateBytes, localFilePath, GLOBAL_STATE_FILE); + StateUtils.writeToFile(stateBytes, localFilePath, StateUtils.GLOBAL_STATE_FILE); GlobalStateInfo globalStateInfo = StateUtils.globalStateFromUTF8(stateBytes); logger.info("Loaded remote state: " + JsonFormat.printer().print(globalStateInfo)); return globalStateInfo; @@ -126,7 +121,7 @@ public void commitGlobalState(GlobalStateInfo globalStateInfo) throws IOExceptio throw new IllegalStateException("Cannot update remote state when configured as read only"); } byte[] stateBytes = StateUtils.globalStateToUTF8(globalStateInfo); - StateUtils.writeToFile(stateBytes, localFilePath, GLOBAL_STATE_FILE); + StateUtils.writeToFile(stateBytes, localFilePath, StateUtils.GLOBAL_STATE_FILE); remoteBackend.uploadGlobalState(serviceName, stateBytes); logger.info("Committed state: " + JsonFormat.printer().print(globalStateInfo)); } @@ -148,7 +143,7 @@ public IndexStateInfo loadIndexState(String indexIdentifier) throws IOException // current copy of the state is always in the local directory Path localIndexStateDirPath = globalState.getStateDir().resolve(indexIdentifier); StateUtils.ensureDirectory(localIndexStateDirPath); - StateUtils.writeToFile(stateBytes, localIndexStateDirPath, INDEX_STATE_FILE); + StateUtils.writeToFile(stateBytes, localIndexStateDirPath, StateUtils.INDEX_STATE_FILE); IndexStateInfo loadedState = StateUtils.indexStateFromUTF8(stateBytes); logger.info( "Loaded remote state for index: " @@ -169,9 +164,9 @@ public void commitIndexState(String indexIdentifier, IndexStateInfo indexStateIn throw new IllegalStateException("Cannot update remote state when configured as read only"); } Path indexStatePath = globalState.getStateDir().resolve(indexIdentifier); - ensureDirectory(indexStatePath); + StateUtils.ensureDirectory(indexStatePath); byte[] stateBytes = StateUtils.indexStateToUTF8(indexStateInfo); - StateUtils.writeToFile(stateBytes, indexStatePath, INDEX_STATE_FILE); + StateUtils.writeToFile(stateBytes, indexStatePath, StateUtils.INDEX_STATE_FILE); remoteBackend.uploadIndexState(serviceName, indexIdentifier, stateBytes); logger.info("Committed index state: " + JsonFormat.printer().print(indexStateInfo)); } diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/StateBackend.java b/src/main/java/com/yelp/nrtsearch/server/state/backend/StateBackend.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/StateBackend.java rename to src/main/java/com/yelp/nrtsearch/server/state/backend/StateBackend.java index d1f27a588..bef507989 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/state/backend/StateBackend.java +++ b/src/main/java/com/yelp/nrtsearch/server/state/backend/StateBackend.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state.backend; +package com.yelp.nrtsearch.server.state.backend; import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; import com.yelp.nrtsearch.server.grpc.IndexStateInfo; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/suggest/ContextSuggestFieldData.java b/src/main/java/com/yelp/nrtsearch/server/suggest/ContextSuggestFieldData.java similarity index 95% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/suggest/ContextSuggestFieldData.java rename to src/main/java/com/yelp/nrtsearch/server/suggest/ContextSuggestFieldData.java index 1f4852e85..a3215407c 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/suggest/ContextSuggestFieldData.java +++ b/src/main/java/com/yelp/nrtsearch/server/suggest/ContextSuggestFieldData.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.suggest; +package com.yelp.nrtsearch.server.suggest; import java.util.List; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/vector/ByteVectorType.java b/src/main/java/com/yelp/nrtsearch/server/vector/ByteVectorType.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/vector/ByteVectorType.java rename to src/main/java/com/yelp/nrtsearch/server/vector/ByteVectorType.java index f08466a9d..309a5f293 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/vector/ByteVectorType.java +++ b/src/main/java/com/yelp/nrtsearch/server/vector/ByteVectorType.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.vector; +package com.yelp.nrtsearch.server.vector; import java.lang.reflect.Array; import java.util.AbstractList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/vector/FloatVectorType.java b/src/main/java/com/yelp/nrtsearch/server/vector/FloatVectorType.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/vector/FloatVectorType.java rename to src/main/java/com/yelp/nrtsearch/server/vector/FloatVectorType.java index 2f25c490a..004b99dd9 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/vector/FloatVectorType.java +++ b/src/main/java/com/yelp/nrtsearch/server/vector/FloatVectorType.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.vector; +package com.yelp.nrtsearch.server.vector; import java.lang.reflect.Array; import java.util.AbstractList; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/ReservoirSampler.java b/src/main/java/com/yelp/nrtsearch/server/warming/ReservoirSampler.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/ReservoirSampler.java rename to src/main/java/com/yelp/nrtsearch/server/warming/ReservoirSampler.java index 8247ddd53..fd5e3b2b8 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/ReservoirSampler.java +++ b/src/main/java/com/yelp/nrtsearch/server/warming/ReservoirSampler.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.warming; +package com.yelp.nrtsearch.server.warming; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicLong; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/Warmer.java b/src/main/java/com/yelp/nrtsearch/server/warming/Warmer.java similarity index 96% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/Warmer.java rename to src/main/java/com/yelp/nrtsearch/server/warming/Warmer.java index 2466f2a3f..124cc4634 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/Warmer.java +++ b/src/main/java/com/yelp/nrtsearch/server/warming/Warmer.java @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.warming; +package com.yelp.nrtsearch.server.warming; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Strings; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.SearchRequest; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; +import com.yelp.nrtsearch.server.handler.SearchHandler; +import com.yelp.nrtsearch.server.index.IndexState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteBackend.IndexResourceType; +import com.yelp.nrtsearch.server.state.StateUtils; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/WarmerConfig.java b/src/main/java/com/yelp/nrtsearch/server/warming/WarmerConfig.java similarity index 97% rename from src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/WarmerConfig.java rename to src/main/java/com/yelp/nrtsearch/server/warming/WarmerConfig.java index 36cae3289..c9d5b3a36 100644 --- a/src/main/java/com/yelp/nrtsearch/server/luceneserver/warming/WarmerConfig.java +++ b/src/main/java/com/yelp/nrtsearch/server/warming/WarmerConfig.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.warming; +package com.yelp.nrtsearch.server.warming; import com.yelp.nrtsearch.server.config.YamlConfigReader; diff --git a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/RestoreCommand.java b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/RestoreCommand.java index 010e14944..41cc6563e 100644 --- a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/RestoreCommand.java +++ b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/RestoreCommand.java @@ -28,11 +28,11 @@ import com.amazonaws.services.s3.transfer.TransferManagerBuilder; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.annotations.VisibleForTesting; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; import com.yelp.nrtsearch.server.utils.TimeStringUtils; import com.yelp.nrtsearch.tools.nrt_utils.state.StateCommandUtils; import java.io.ByteArrayInputStream; diff --git a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotCommand.java b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotCommand.java index b29fe06a7..d056727cf 100644 --- a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotCommand.java +++ b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotCommand.java @@ -26,7 +26,7 @@ import com.amazonaws.services.s3.transfer.TransferManagerBuilder; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.annotations.VisibleForTesting; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.remote.s3.S3Backend; diff --git a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommand.java b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommand.java index c3ba3c560..4a1c0d13c 100644 --- a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommand.java +++ b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommand.java @@ -23,7 +23,7 @@ import com.amazonaws.services.s3.model.S3ObjectSummary; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Sets; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.remote.s3.S3Backend; diff --git a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtils.java b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtils.java index b2f31f76b..bb69918d9 100644 --- a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtils.java +++ b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtils.java @@ -29,10 +29,10 @@ import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; import com.yelp.nrtsearch.server.grpc.IndexGlobalState; import com.yelp.nrtsearch.server.grpc.IndexStateInfo; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/UpdateGlobalIndexStateCommand.java b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/UpdateGlobalIndexStateCommand.java index 69d4437ea..b1fd32618 100644 --- a/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/UpdateGlobalIndexStateCommand.java +++ b/src/main/java/com/yelp/nrtsearch/tools/nrt_utils/state/UpdateGlobalIndexStateCommand.java @@ -20,10 +20,10 @@ import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; import com.yelp.nrtsearch.server.grpc.IndexGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import com.yelp.nrtsearch.server.utils.TimeStringUtils; import java.util.concurrent.Callable; import picocli.CommandLine; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/ServerTestCase.java b/src/test/java/com/yelp/nrtsearch/server/ServerTestCase.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/ServerTestCase.java rename to src/test/java/com/yelp/nrtsearch/server/ServerTestCase.java index 002561ced..17a30d588 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/ServerTestCase.java +++ b/src/test/java/com/yelp/nrtsearch/server/ServerTestCase.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver; +package com.yelp.nrtsearch.server; import static com.yelp.nrtsearch.server.grpc.GrpcServer.rmDir; @@ -33,8 +33,8 @@ import com.yelp.nrtsearch.server.grpc.RefreshRequest; import com.yelp.nrtsearch.server.grpc.SettingsRequest; import com.yelp.nrtsearch.server.grpc.StartIndexRequest; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.server.utils.LuceneServerTestConfigurationFactory; import io.grpc.stub.StreamObserver; import io.grpc.testing.GrpcCleanupRule; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalyzerCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/analysis/AnalyzerCreatorTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalyzerCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/analysis/AnalyzerCreatorTest.java index 572bac377..751d4e42d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/AnalyzerCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/analysis/AnalyzerCreatorTest.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.getStandardAnalyzer; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.hasAnalyzer; -import static com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreator.isAnalyzerDefined; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.getStandardAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.hasAnalyzer; +import static com.yelp.nrtsearch.server.analysis.AnalyzerCreator.isAnalyzerDefined; import static org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.assertTokenStreamContents; import static org.apache.lucene.tests.util.LuceneTestCase.random; import static org.junit.Assert.assertEquals; @@ -568,7 +568,7 @@ public void testInvalidTokenFilterConstructor() { fail(); } catch (UnsupportedOperationException e) { assertEquals( - "Factory com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreatorTest$MyBadTokenFilter " + "Factory com.yelp.nrtsearch.server.analysis.AnalyzerCreatorTest$MyBadTokenFilter " + "cannot be instantiated. This is likely due to missing Map constructor.", e.getMessage()); } @@ -772,7 +772,7 @@ public void testInvalidCharFilterConstructor() { fail(); } catch (UnsupportedOperationException e) { assertEquals( - "Factory com.yelp.nrtsearch.server.luceneserver.analysis.AnalyzerCreatorTest$MyBadCharFilter " + "Factory com.yelp.nrtsearch.server.analysis.AnalyzerCreatorTest$MyBadCharFilter " + "cannot be instantiated. This is likely due to missing Map constructor.", e.getMessage()); } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactoryITest.java b/src/test/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactoryITest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactoryITest.java rename to src/test/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactoryITest.java index faf2c00b4..2cf90a60e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactoryITest.java +++ b/src/test/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactoryITest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -24,7 +25,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactoryTest.java b/src/test/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactoryTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactoryTest.java rename to src/test/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactoryTest.java index 1176b0cc1..147c1613c 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/MappingV2CharFilterFactoryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/analysis/MappingV2CharFilterFactoryTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import static org.apache.lucene.analysis.AnalysisSPILoader.newFactoryClassInstance; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/NrtsearchSynonymParserTest.java b/src/test/java/com/yelp/nrtsearch/server/analysis/NrtsearchSynonymParserTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/NrtsearchSynonymParserTest.java rename to src/test/java/com/yelp/nrtsearch/server/analysis/NrtsearchSynonymParserTest.java index 99ceade0b..4ae40b408 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/NrtsearchSynonymParserTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/analysis/NrtsearchSynonymParserTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import static org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.assertAnalyzesTo; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactoryITest.java b/src/test/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactoryITest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactoryITest.java rename to src/test/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactoryITest.java index fa3fbe5d0..719c6819e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactoryITest.java +++ b/src/test/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactoryITest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import com.yelp.nrtsearch.server.plugins.Plugin; import io.grpc.testing.GrpcCleanupRule; import java.io.ByteArrayInputStream; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactoryTest.java b/src/test/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactoryTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactoryTest.java rename to src/test/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactoryTest.java index 488a3b4e3..4fcbc776b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/analysis/SynonymV2GraphFilterFactoryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/analysis/SynonymV2GraphFilterFactoryTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.analysis; +package com.yelp.nrtsearch.server.analysis; import com.carrotsearch.randomizedtesting.RandomizedRunner; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/codec/ServerCodecTest.java b/src/test/java/com/yelp/nrtsearch/server/codec/ServerCodecTest.java similarity index 94% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/codec/ServerCodecTest.java rename to src/test/java/com/yelp/nrtsearch/server/codec/ServerCodecTest.java index 05aa179ac..5ddd6d95e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/codec/ServerCodecTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/codec/ServerCodecTest.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.codec; +package com.yelp.nrtsearch.server.codec; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.*; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VectorFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.field.VectorFieldDef; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; import java.io.ByteArrayInputStream; import java.util.List; import java.util.Set; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/concurrent/ThreadPoolExecutorFactoryTest.java b/src/test/java/com/yelp/nrtsearch/server/concurrent/ThreadPoolExecutorFactoryTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/concurrent/ThreadPoolExecutorFactoryTest.java rename to src/test/java/com/yelp/nrtsearch/server/concurrent/ThreadPoolExecutorFactoryTest.java index 819c5b4a8..ee5caefd6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/concurrent/ThreadPoolExecutorFactoryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/concurrent/ThreadPoolExecutorFactoryTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.concurrent; +package com.yelp.nrtsearch.server.concurrent; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; diff --git a/src/test/java/com/yelp/nrtsearch/server/config/ThreadPoolConfigurationTest.java b/src/test/java/com/yelp/nrtsearch/server/config/ThreadPoolConfigurationTest.java index fe55669ac..d0e472751 100644 --- a/src/test/java/com/yelp/nrtsearch/server/config/ThreadPoolConfigurationTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/config/ThreadPoolConfigurationTest.java @@ -17,7 +17,7 @@ import static org.junit.Assert.*; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import java.io.ByteArrayInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestProcessorTest.java b/src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRequestProcessorTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestProcessorTest.java rename to src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRequestProcessorTest.java index 437d8ac4c..6ac48bc26 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestProcessorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRequestProcessorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.custom.request; +package com.yelp.nrtsearch.server.custom.request; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestTestPlugin.java b/src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRequestTestPlugin.java similarity index 94% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestTestPlugin.java rename to src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRequestTestPlugin.java index 5a8257161..f59d016fa 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRequestTestPlugin.java +++ b/src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRequestTestPlugin.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.custom.request; +package com.yelp.nrtsearch.server.custom.request; import com.yelp.nrtsearch.server.plugins.CustomRequestPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRpcTest.java b/src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRpcTest.java similarity index 93% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRpcTest.java rename to src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRpcTest.java index e0b2a73cf..b6fd248e3 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/custom/request/CustomRpcTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/custom/request/CustomRpcTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.custom.request; +package com.yelp.nrtsearch.server.custom.request; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.CustomRequest; import com.yelp.nrtsearch.server.grpc.CustomResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import com.yelp.nrtsearch.server.plugins.Plugin; import io.grpc.testing.GrpcCleanupRule; import java.util.List; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/DefaultSharedDocContextTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/DefaultSharedDocContextTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/DefaultSharedDocContextTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/DefaultSharedDocContextTest.java index 375b15739..00d1d3cd3 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/DefaultSharedDocContextTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/DefaultSharedDocContextTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/ObjectStructDocValuesTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/ObjectStructDocValuesTest.java similarity index 90% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/ObjectStructDocValuesTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/ObjectStructDocValuesTest.java index 65c524e29..c6510dd6d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/ObjectStructDocValuesTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/ObjectStructDocValuesTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -35,9 +33,9 @@ public class ObjectStructDocValuesTest { private void verifyUnset(LoadedDocValues.ObjectStructDocValues loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue( @@ -148,10 +146,10 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, struct1, struct2); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(2)); - assertOutOfBounds(() -> loadedData.toFieldValue(2)); + TestUtils.assertOutOfBounds(() -> loadedData.get(2)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(2)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SharedDocContextTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SharedDocContextTest.java similarity index 94% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SharedDocContextTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SharedDocContextTest.java index 3b83bfa02..4551628d1 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SharedDocContextTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SharedDocContextTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -27,13 +28,12 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.CompositeFieldValue; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTaskProvider; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks; -import com.yelp.nrtsearch.server.luceneserver.search.FetchTasks.FetchTask; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; import com.yelp.nrtsearch.server.plugins.FetchTaskPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.search.FetchTaskProvider; +import com.yelp.nrtsearch.server.search.FetchTasks; +import com.yelp.nrtsearch.server.search.FetchTasks.FetchTask; +import com.yelp.nrtsearch.server.search.SearchContext; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleBooleanTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SingleBooleanTest.java similarity index 78% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleBooleanTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SingleBooleanTest.java index e1ff84f28..7c7c4878b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleBooleanTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SingleBooleanTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SingleBooleanTest { private void verifyUnset(LoadedDocValues.SingleBoolean loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getBoolean(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getBoolean(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SingleBoolean loadedData, boolean value) { @@ -81,12 +79,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, true); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getBoolean(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getBoolean(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(1)); - assertOutOfBounds(() -> loadedData.getBoolean(1)); - assertOutOfBounds(() -> loadedData.toFieldValue(1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(1)); + TestUtils.assertOutOfBounds(() -> loadedData.getBoolean(1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(1)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleDoubleTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SingleDoubleTest.java similarity index 81% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleDoubleTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SingleDoubleTest.java index 52dcd2fe4..e65264b03 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleDoubleTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SingleDoubleTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SingleDoubleTest { private void verifyUnset(LoadedDocValues.SingleDouble loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getDouble(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getDouble(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SingleDouble loadedData, double value) { @@ -100,12 +98,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15.0); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getDouble(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getDouble(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(1)); - assertOutOfBounds(() -> loadedData.getDouble(1)); - assertOutOfBounds(() -> loadedData.toFieldValue(1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(1)); + TestUtils.assertOutOfBounds(() -> loadedData.getDouble(1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(1)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleFloatTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SingleFloatTest.java similarity index 82% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleFloatTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SingleFloatTest.java index b8579174d..df55bc8a8 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleFloatTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SingleFloatTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SingleFloatTest { private void verifyUnset(LoadedDocValues.SingleFloat loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getFloat(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getFloat(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SingleFloat loadedData, float value) { @@ -100,12 +98,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15.0f); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getFloat(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getFloat(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(1)); - assertOutOfBounds(() -> loadedData.getFloat(1)); - assertOutOfBounds(() -> loadedData.toFieldValue(1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(1)); + TestUtils.assertOutOfBounds(() -> loadedData.getFloat(1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(1)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleIntegerTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SingleIntegerTest.java similarity index 79% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleIntegerTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SingleIntegerTest.java index 6bafca044..d2643312b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleIntegerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SingleIntegerTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SingleIntegerTest { private void verifyUnset(LoadedDocValues.SingleInteger loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getInt(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getInt(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SingleInteger loadedData, int value) { @@ -84,12 +82,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getInt(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getInt(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(1)); - assertOutOfBounds(() -> loadedData.getInt(1)); - assertOutOfBounds(() -> loadedData.toFieldValue(1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(1)); + TestUtils.assertOutOfBounds(() -> loadedData.getInt(1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(1)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleLongTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SingleLongTest.java similarity index 78% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleLongTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SingleLongTest.java index 132c0fa54..10f224fdf 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SingleLongTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SingleLongTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SingleLongTest { private void verifyUnset(LoadedDocValues.SingleLong loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getLong(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getLong(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SingleLong loadedData, long value) { @@ -83,12 +81,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15L); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getLong(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getLong(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(1)); - assertOutOfBounds(() -> loadedData.getLong(1)); - assertOutOfBounds(() -> loadedData.toFieldValue(1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(1)); + TestUtils.assertOutOfBounds(() -> loadedData.getLong(1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(1)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedBooleansTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SortedBooleansTest.java similarity index 80% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedBooleansTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SortedBooleansTest.java index f1fe0b30d..6b7c792cd 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedBooleansTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SortedBooleansTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SortedBooleansTest { private void verifyUnset(LoadedDocValues.SortedBooleans loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getBoolean(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getBoolean(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SortedBooleans loadedData, boolean... values) { @@ -88,12 +86,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, true, false); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getBoolean(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getBoolean(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(2)); - assertOutOfBounds(() -> loadedData.getBoolean(2)); - assertOutOfBounds(() -> loadedData.toFieldValue(2)); + TestUtils.assertOutOfBounds(() -> loadedData.get(2)); + TestUtils.assertOutOfBounds(() -> loadedData.getBoolean(2)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(2)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedDoublesTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SortedDoublesTest.java similarity index 85% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedDoublesTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SortedDoublesTest.java index a5033d46d..92deb3f6d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedDoublesTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SortedDoublesTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -32,10 +30,10 @@ public class SortedDoublesTest { private void verifyUnset(LoadedDocValues.SortedDoubles loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getDouble(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getDouble(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SortedDoubles loadedData, double... values) { @@ -117,12 +115,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15.0, 16.0); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getDouble(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getDouble(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(2)); - assertOutOfBounds(() -> loadedData.getDouble(2)); - assertOutOfBounds(() -> loadedData.toFieldValue(2)); + TestUtils.assertOutOfBounds(() -> loadedData.get(2)); + TestUtils.assertOutOfBounds(() -> loadedData.getDouble(2)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(2)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedFloatsTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SortedFloatsTest.java similarity index 85% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedFloatsTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SortedFloatsTest.java index ec72e3839..fd2ef2248 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedFloatsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SortedFloatsTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -32,10 +30,10 @@ public class SortedFloatsTest { private void verifyUnset(LoadedDocValues.SortedFloats loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getFloat(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getFloat(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SortedFloats loadedData, float... values) { @@ -118,12 +116,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15.0f, 16.0f); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getFloat(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getFloat(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(2)); - assertOutOfBounds(() -> loadedData.getFloat(2)); - assertOutOfBounds(() -> loadedData.toFieldValue(2)); + TestUtils.assertOutOfBounds(() -> loadedData.get(2)); + TestUtils.assertOutOfBounds(() -> loadedData.getFloat(2)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(2)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedIntegersTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SortedIntegersTest.java similarity index 81% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedIntegersTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SortedIntegersTest.java index 2745213cf..3b92ccbd5 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedIntegersTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SortedIntegersTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SortedIntegersTest { private void verifyUnset(LoadedDocValues.SortedIntegers loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getInt(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getInt(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SortedIntegers loadedData, int... values) { @@ -103,12 +101,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15, 16); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getInt(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getInt(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(2)); - assertOutOfBounds(() -> loadedData.getInt(2)); - assertOutOfBounds(() -> loadedData.toFieldValue(2)); + TestUtils.assertOutOfBounds(() -> loadedData.get(2)); + TestUtils.assertOutOfBounds(() -> loadedData.getInt(2)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(2)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedLongsTest.java b/src/test/java/com/yelp/nrtsearch/server/doc/SortedLongsTest.java similarity index 80% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedLongsTest.java rename to src/test/java/com/yelp/nrtsearch/server/doc/SortedLongsTest.java index e1beac76d..239d2a725 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/SortedLongsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/SortedLongsTest.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertNoDocValues; -import static com.yelp.nrtsearch.server.luceneserver.doc.TestUtils.assertOutOfBounds; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; @@ -31,10 +29,10 @@ public class SortedLongsTest { private void verifyUnset(LoadedDocValues.SortedLongs loadedData) { assertEquals(0, loadedData.size()); - assertNoDocValues(() -> loadedData.get(0)); - assertNoDocValues(loadedData::getValue); - assertNoDocValues(() -> loadedData.getLong(0)); - assertNoDocValues(() -> loadedData.toFieldValue(0)); + TestUtils.assertNoDocValues(() -> loadedData.get(0)); + TestUtils.assertNoDocValues(loadedData::getValue); + TestUtils.assertNoDocValues(() -> loadedData.getLong(0)); + TestUtils.assertNoDocValues(() -> loadedData.toFieldValue(0)); } private void verifySetToValue(LoadedDocValues.SortedLongs loadedData, long... values) { @@ -89,12 +87,12 @@ public void testSetDocValuesOutOfBounds() throws IOException { loadedData.setDocId(0); verifySetToValue(loadedData, 15L, 16L); - assertOutOfBounds(() -> loadedData.get(-1)); - assertOutOfBounds(() -> loadedData.getLong(-1)); - assertOutOfBounds(() -> loadedData.toFieldValue(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.get(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.getLong(-1)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(-1)); - assertOutOfBounds(() -> loadedData.get(2)); - assertOutOfBounds(() -> loadedData.getLong(2)); - assertOutOfBounds(() -> loadedData.toFieldValue(2)); + TestUtils.assertOutOfBounds(() -> loadedData.get(2)); + TestUtils.assertOutOfBounds(() -> loadedData.getLong(2)); + TestUtils.assertOutOfBounds(() -> loadedData.toFieldValue(2)); } } diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/TestUtils.java b/src/test/java/com/yelp/nrtsearch/server/doc/TestUtils.java similarity index 95% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/TestUtils.java rename to src/test/java/com/yelp/nrtsearch/server/doc/TestUtils.java index 65ab2dde6..64b907b0d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/doc/TestUtils.java +++ b/src/test/java/com/yelp/nrtsearch/server/doc/TestUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.doc; +package com.yelp.nrtsearch.server.doc; import static org.junit.Assert.*; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/DocValuesFacetsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/DocValuesFacetsTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/DocValuesFacetsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/DocValuesFacetsTest.java index 61012ad31..d818872a4 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/DocValuesFacetsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/DocValuesFacetsTest.java @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; @@ -26,7 +27,6 @@ import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/EagerGlobalOrdinalsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/EagerGlobalOrdinalsTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/EagerGlobalOrdinalsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/EagerGlobalOrdinalsTest.java index 4334e7766..f618c384c 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/EagerGlobalOrdinalsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/EagerGlobalOrdinalsTest.java @@ -13,20 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import com.yelp.nrtsearch.server.ServerTestCase; +import com.yelp.nrtsearch.server.field.FieldDef; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.RefreshRequest; import com.yelp.nrtsearch.server.grpc.SearchRequest; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; +import com.yelp.nrtsearch.server.index.ShardState; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetScriptFacetsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/FacetScriptFacetsTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetScriptFacetsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/FacetScriptFacetsTest.java index 0f66220ac..879837a80 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetScriptFacetsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/FacetScriptFacetsTest.java @@ -13,11 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; @@ -27,14 +29,12 @@ import com.yelp.nrtsearch.server.grpc.Script; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript.SegmentFactory; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; +import com.yelp.nrtsearch.server.script.FacetScript; +import com.yelp.nrtsearch.server.script.FacetScript.SegmentFactory; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetTopHitsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/FacetTopHitsTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetTopHitsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/FacetTopHitsTest.java index 8f363cd4b..c8827862c 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FacetTopHitsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/FacetTopHitsTest.java @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; @@ -32,7 +33,6 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SortFields; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FilteredSSDVFacetCountsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/FilteredSSDVFacetCountsTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FilteredSSDVFacetCountsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/FilteredSSDVFacetCountsTest.java index c9f0acb3f..45aa14908 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/FilteredSSDVFacetCountsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/FilteredSSDVFacetCountsTest.java @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; @@ -25,7 +26,6 @@ import com.yelp.nrtsearch.server.grpc.LabelAndValue; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/NumberFieldFacetsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/NumberFieldFacetsTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/NumberFieldFacetsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/NumberFieldFacetsTest.java index d16457a94..e7070397f 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/NumberFieldFacetsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/NumberFieldFacetsTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; @@ -25,7 +26,6 @@ import com.yelp.nrtsearch.server.grpc.NumericRangeType; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/RuntimeScriptFacetsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/RuntimeScriptFacetsTest.java similarity index 95% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/RuntimeScriptFacetsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/RuntimeScriptFacetsTest.java index ece01679f..ae67d8813 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/RuntimeScriptFacetsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/RuntimeScriptFacetsTest.java @@ -13,22 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; import com.google.protobuf.Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.script.RuntimeScript; -import com.yelp.nrtsearch.server.luceneserver.script.RuntimeScript.SegmentFactory; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; +import com.yelp.nrtsearch.server.script.RuntimeScript; +import com.yelp.nrtsearch.server.script.RuntimeScript.SegmentFactory; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.*; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/TextFieldFacetsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/TextFieldFacetsTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/TextFieldFacetsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/TextFieldFacetsTest.java index aff0c623f..58147b231 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/TextFieldFacetsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/TextFieldFacetsTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetHierarchyPath; @@ -27,7 +28,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/VirtualFieldFacetsTest.java b/src/test/java/com/yelp/nrtsearch/server/facet/VirtualFieldFacetsTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/VirtualFieldFacetsTest.java rename to src/test/java/com/yelp/nrtsearch/server/facet/VirtualFieldFacetsTest.java index 8268c13b0..f2978a622 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/facet/VirtualFieldFacetsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/facet/VirtualFieldFacetsTest.java @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.facet; +package com.yelp.nrtsearch.server.facet; -import static com.yelp.nrtsearch.server.luceneserver.facet.NumberFieldFacetsTest.assertFacetResult; +import static com.yelp.nrtsearch.server.facet.NumberFieldFacetsTest.assertFacetResult; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FacetResult; @@ -28,7 +29,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.VirtualField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/AtomFieldDefTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/AtomFieldDefTest.java index 9d99a807d..b64b02b94 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/AtomFieldDefTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.TextDocValuesType; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; import java.io.ByteArrayInputStream; import java.util.Collections; import org.apache.lucene.index.DocValuesType; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldTest.java b/src/test/java/com/yelp/nrtsearch/server/field/AtomFieldTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/AtomFieldTest.java index 4ea8ee797..1150cb8ab 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/AtomFieldTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/AtomFieldTest.java @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -32,7 +33,6 @@ import com.yelp.nrtsearch.server.grpc.TermInSetQuery.LongTerms; import com.yelp.nrtsearch.server.grpc.TermInSetQuery.TextTerms; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/BooleanFieldDefTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/BooleanFieldDefTest.java index a5dd7cf0b..f3d7f7a63 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/BooleanFieldDefTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldTest.java b/src/test/java/com/yelp/nrtsearch/server/field/BooleanFieldTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/BooleanFieldTest.java index dd9139b3f..bca69739a 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/BooleanFieldTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/BooleanFieldTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.*; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -27,7 +28,6 @@ import com.yelp.nrtsearch.server.grpc.TermInSetQuery; import com.yelp.nrtsearch.server.grpc.TermInSetQuery.TextTerms; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/ContextSuggestFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/ContextSuggestFieldDefTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/ContextSuggestFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/ContextSuggestFieldDefTest.java index dbbe25284..556379676 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/ContextSuggestFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/ContextSuggestFieldDefTest.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; -import static com.yelp.nrtsearch.server.luceneserver.search.collectors.MyTopSuggestDocsCollector.SUGGEST_KEY_FIELD_NAME; +import static com.yelp.nrtsearch.server.search.collectors.MyTopSuggestDocsCollector.SUGGEST_KEY_FIELD_NAME; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.Analyzer; import com.yelp.nrtsearch.server.grpc.CompletionQuery; import com.yelp.nrtsearch.server.grpc.Field; @@ -27,7 +28,6 @@ import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Set; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/DateTimeFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/DateTimeFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/DateTimeFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/DateTimeFieldDefTest.java index 50b4a3aad..34ce7669d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/DateTimeFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/DateTimeFieldDefTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -24,7 +25,6 @@ import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/DoubleFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/DoubleFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/DoubleFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/DoubleFieldDefTest.java index b9efc3a3c..f952b7c54 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/DoubleFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/DoubleFieldDefTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/EagerFieldOrdinalTest.java b/src/test/java/com/yelp/nrtsearch/server/field/EagerFieldOrdinalTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/EagerFieldOrdinalTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/EagerFieldOrdinalTest.java index a26bf5ea0..8d6ba4497 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/EagerFieldOrdinalTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/EagerFieldOrdinalTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.Collector; @@ -26,9 +27,8 @@ import com.yelp.nrtsearch.server.grpc.RefreshRequest; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.TermsCollector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.search.GlobalOrdinalLookup; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.search.GlobalOrdinalLookup; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/field/FieldDefCreatorTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/FieldDefCreatorTest.java index e988aaa04..ddb54931d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/FieldDefCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/FieldDefCreatorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/FloatFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/FloatFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/FloatFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/FloatFieldDefTest.java index 0d564e9cc..edae8daf0 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/FloatFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/FloatFieldDefTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/IdFieldTest.java b/src/test/java/com/yelp/nrtsearch/server/field/IdFieldTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/IdFieldTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/IdFieldTest.java index 75f38354a..ca0a034cd 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/IdFieldTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/IdFieldTest.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/IntFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/IntFieldDefTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/IntFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/IntFieldDefTest.java index 0702aad19..baae62854 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/IntFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/IntFieldDefTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/LatLonFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/LatLonFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/LatLonFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/LatLonFieldDefTest.java index c12253fc2..8553fb71d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/LatLonFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/LatLonFieldDefTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import com.google.type.LatLng; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/LongFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/LongFieldDefTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/LongFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/LongFieldDefTest.java index 370c8778d..270531789 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/LongFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/LongFieldDefTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.RangeQuery; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/MultivaluedObjectTest.java b/src/test/java/com/yelp/nrtsearch/server/field/MultivaluedObjectTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/MultivaluedObjectTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/MultivaluedObjectTest.java index 6043113ed..3ba57ad8a 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/MultivaluedObjectTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/MultivaluedObjectTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.BooleanClause; import com.yelp.nrtsearch.server.grpc.BooleanQuery; @@ -31,7 +32,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import com.yelp.nrtsearch.server.utils.StructValueTransformer; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/ObjectFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/ObjectFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/ObjectFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/ObjectFieldDefTest.java index f4030341f..c8fb77779 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/ObjectFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/ObjectFieldDefTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; import static org.junit.Assert.assertEquals; @@ -24,8 +24,8 @@ import com.google.protobuf.NullValue; import com.google.protobuf.Struct; import com.google.protobuf.Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/PolygonFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/PolygonFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/PolygonFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/PolygonFieldDefTest.java index 554aeebbb..ab6342eb8 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/PolygonFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/PolygonFieldDefTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -23,9 +23,9 @@ import com.google.protobuf.Struct; import com.google.protobuf.Value; import com.google.type.LatLng; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.*; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/TestFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/TestFieldDefTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/TestFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/TestFieldDefTest.java index 23cd3def5..d4df5a539 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/TestFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/TestFieldDefTest.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.Field; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; import java.io.ByteArrayInputStream; import java.util.Collections; import org.apache.lucene.index.IndexOptions; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/TextFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/TextFieldDefTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/TextFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/TextFieldDefTest.java index 983a4fae0..7013436d3 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/TextFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/TextFieldDefTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.*; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.TextDocValuesType; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; import java.io.ByteArrayInputStream; import java.util.Collections; import org.apache.lucene.analysis.Analyzer; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/VectorFieldDefTest.java b/src/test/java/com/yelp/nrtsearch/server/field/VectorFieldDefTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/field/VectorFieldDefTest.java rename to src/test/java/com/yelp/nrtsearch/server/field/VectorFieldDefTest.java index 5be5262a0..5c553d60e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/field/VectorFieldDefTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/field/VectorFieldDefTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.field; +package com.yelp.nrtsearch.server.field; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -23,12 +23,12 @@ import com.google.common.primitives.Floats; import com.google.protobuf.ByteString; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics.VectorDiagnostics; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.FieldValue.Vector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/CopyFileTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/CopyFileTest.java index 76693093b..7598f9f53 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/CopyFileTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/CopyFileTest.java @@ -21,7 +21,7 @@ import com.google.protobuf.ByteString; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; import io.grpc.stub.StreamObserver; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/CustomFieldTypeTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/CustomFieldTypeTest.java index 815e39710..ca97cf631 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/CustomFieldTypeTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/CustomFieldTypeTest.java @@ -19,10 +19,10 @@ import static org.junit.Assert.assertEquals; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefProvider; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDefProvider; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.plugins.FieldTypePlugin; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.utils.LuceneServerTestConfigurationFactory; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/DeadLineUtilsEnableTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/DeadLineUtilsEnableTest.java index a01dde098..81d5179b0 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/DeadLineUtilsEnableTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/DeadLineUtilsEnableTest.java @@ -17,7 +17,7 @@ import static org.junit.Assert.assertTrue; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; +import com.yelp.nrtsearch.server.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import org.junit.ClassRule; import org.junit.Test; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/ExistsQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/ExistsQueryTest.java index 6e572ca52..2bff06576 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/ExistsQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/ExistsQueryTest.java @@ -20,8 +20,8 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.*; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServer.java b/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServer.java index f3a0755f2..2776c6fd9 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServer.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServer.java @@ -19,11 +19,11 @@ import com.google.protobuf.util.JsonFormat; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; import com.yelp.nrtsearch.server.monitoring.Configuration; import com.yelp.nrtsearch.server.monitoring.LuceneServerMonitoringServerInterceptor; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.Server; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplierTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplierTest.java index 61975baa6..5005de1c4 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplierTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/GrpcServerExecutorSupplierTest.java @@ -19,9 +19,9 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import com.yelp.nrtsearch.server.config.ThreadPoolConfiguration; import com.yelp.nrtsearch.server.config.YamlConfigReader; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; import io.grpc.Metadata; import io.grpc.MethodDescriptor; import io.grpc.ServerCall; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/IndexStartTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/IndexStartTest.java index 80e99e90c..061f4fa1f 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/IndexStartTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/IndexStartTest.java @@ -24,7 +24,7 @@ import com.google.protobuf.BoolValue; import com.google.protobuf.Int32Value; import com.yelp.nrtsearch.server.config.IndexStartConfig.IndexDataLocationType; -import com.yelp.nrtsearch.server.luceneserver.nrt.NRTReplicaNode; +import com.yelp.nrtsearch.server.nrt.NRTReplicaNode; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/LuceneServerTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/LuceneServerTest.java index d5bd264f6..9d1d89e30 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/LuceneServerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/LuceneServerTest.java @@ -30,10 +30,10 @@ import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.CompositeFieldValue; -import com.yelp.nrtsearch.server.luceneserver.search.cache.NrtQueryCache; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.search.cache.NrtQueryCache; +import com.yelp.nrtsearch.server.state.StateUtils; import com.yelp.nrtsearch.server.utils.LuceneServerTestConfigurationFactory; import com.yelp.nrtsearch.test_utils.AmazonS3Provider; import io.grpc.StatusRuntimeException; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/MatchAndTermQueryBehaviorWithTokenizationTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/MatchAndTermQueryBehaviorWithTokenizationTest.java index 7138be5b4..2990f17ea 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/MatchAndTermQueryBehaviorWithTokenizationTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/MatchAndTermQueryBehaviorWithTokenizationTest.java @@ -17,7 +17,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; +import com.yelp.nrtsearch.server.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/MergeBehaviorTests.java b/src/test/java/com/yelp/nrtsearch/server/grpc/MergeBehaviorTests.java index 99c544864..a003b0898 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/MergeBehaviorTests.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/MergeBehaviorTests.java @@ -21,7 +21,7 @@ import com.google.common.collect.Sets; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.BackendGlobalState; import com.yelp.nrtsearch.server.utils.LuceneServerTestConfigurationFactory; import io.grpc.testing.GrpcCleanupRule; import io.prometheus.metrics.model.registry.PrometheusRegistry; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/MultiFieldTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/MultiFieldTest.java index c154af263..b54c011b5 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/MultiFieldTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/MultiFieldTest.java @@ -18,9 +18,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/MultiIndexAddDocumentsTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/MultiIndexAddDocumentsTest.java index 707c1f868..931cdf777 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/MultiIndexAddDocumentsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/MultiIndexAddDocumentsTest.java @@ -18,8 +18,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.io.Reader; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/MultiSegmentTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/MultiSegmentTest.java index affd6f123..b60a8986d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/MultiSegmentTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/MultiSegmentTest.java @@ -17,7 +17,7 @@ import static org.junit.Assert.assertEquals; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; +import com.yelp.nrtsearch.server.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/NestedFieldTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/NestedFieldTest.java index ab5eba354..61e79d67b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/NestedFieldTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/NestedFieldTest.java @@ -18,7 +18,7 @@ import static org.junit.Assert.*; import com.yelp.nrtsearch.server.config.IndexStartConfig; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexState; import java.io.IOException; import java.util.stream.Stream; import org.junit.After; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClientTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClientTest.java index 14fdb67d0..de8de72a9 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClientTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/ReplicationServerClientTest.java @@ -31,7 +31,7 @@ import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.LuceneServer.ReplicationServerImpl; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient.DiscoveryFileAndPort; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.grpc.ManagedChannelBuilder; import io.grpc.Server; import io.grpc.ServerBuilder; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/SearchStateTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/SearchStateTest.java index 48d4d6b21..2a07ad69a 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/SearchStateTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/SearchStateTest.java @@ -18,9 +18,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.SearchResponse.SearchState; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/SortFieldTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/SortFieldTest.java index 700859fd0..b2bd7a967 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/SortFieldTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/SortFieldTest.java @@ -19,7 +19,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.type.LatLng; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; +import com.yelp.nrtsearch.server.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Arrays; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/StartHitTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/StartHitTest.java index d05877bac..2ef3f038a 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/StartHitTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/StartHitTest.java @@ -17,7 +17,7 @@ import static org.junit.Assert.assertEquals; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; +import com.yelp.nrtsearch.server.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/StateBackendServerTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/StateBackendServerTest.java index acec4cb76..ad8d45643 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/StateBackendServerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/StateBackendServerTest.java @@ -37,10 +37,10 @@ import com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl; import com.yelp.nrtsearch.server.grpc.LuceneServer.ReplicationServerImpl; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.index.ImmutableIndexState; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.index.ImmutableIndexState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import com.yelp.nrtsearch.test_utils.AmazonS3Provider; import io.grpc.Server; import io.grpc.ServerBuilder; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/TestServer.java b/src/test/java/com/yelp/nrtsearch/server/grpc/TestServer.java index d5ffd3c23..973ba5507 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/TestServer.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/TestServer.java @@ -34,12 +34,12 @@ import com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl; import com.yelp.nrtsearch.server.grpc.LuceneServer.ReplicationServerImpl; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.GlobalState; import com.yelp.nrtsearch.server.utils.FileUtils; import io.findify.s3mock.S3Mock; import io.grpc.Server; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/TimeoutTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/TimeoutTest.java index 31bf2e5a1..ed77b14be 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/TimeoutTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/TimeoutTest.java @@ -19,17 +19,17 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; +import com.yelp.nrtsearch.server.facet.DrillSidewaysImpl; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.facet.DrillSidewaysImpl; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCutoffWrapper; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCutoffWrapper.CollectionTimeoutException; -import com.yelp.nrtsearch.server.luceneserver.search.SearchRequestProcessor; -import com.yelp.nrtsearch.server.luceneserver.search.SearcherResult; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.search.SearchCollectorManager; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchCutoffWrapper; +import com.yelp.nrtsearch.server.search.SearchCutoffWrapper.CollectionTimeoutException; +import com.yelp.nrtsearch.server.search.SearchRequestProcessor; +import com.yelp.nrtsearch.server.search.SearcherResult; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/TotalHitsThresholdTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/TotalHitsThresholdTest.java index 7b079bb1a..8f380e392 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/TotalHitsThresholdTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/TotalHitsThresholdTest.java @@ -17,10 +17,10 @@ import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.TotalHits.Relation; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/grpc/VerifyIndexIdTest.java b/src/test/java/com/yelp/nrtsearch/server/grpc/VerifyIndexIdTest.java index e791ac56b..7d9806a89 100644 --- a/src/test/java/com/yelp/nrtsearch/server/grpc/VerifyIndexIdTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/grpc/VerifyIndexIdTest.java @@ -18,7 +18,7 @@ import static org.junit.Assert.*; import com.yelp.nrtsearch.server.config.IndexStartConfig; -import com.yelp.nrtsearch.server.luceneserver.handler.Handler; +import com.yelp.nrtsearch.server.handler.Handler; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/highlights/NRTFastVectorHighlighterTest.java b/src/test/java/com/yelp/nrtsearch/server/highlights/NRTFastVectorHighlighterTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/highlights/NRTFastVectorHighlighterTest.java rename to src/test/java/com/yelp/nrtsearch/server/highlights/NRTFastVectorHighlighterTest.java index de02c5fb1..2aee727ed 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/highlights/NRTFastVectorHighlighterTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/highlights/NRTFastVectorHighlighterTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.highlights; +package com.yelp.nrtsearch.server.highlights; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -22,6 +22,7 @@ import com.google.protobuf.BoolValue; import com.google.protobuf.StringValue; import com.google.protobuf.UInt32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -35,7 +36,6 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/BackendStateManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/index/BackendStateManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/index/BackendStateManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/index/BackendStateManagerTest.java index f96044892..6c399db62 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/BackendStateManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/index/BackendStateManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; @@ -31,6 +31,7 @@ import com.google.protobuf.Int32Value; import com.google.protobuf.StringValue; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.field.FieldDefCreator; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.FieldType; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; @@ -38,13 +39,12 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.backend.StateBackend; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.state.backend.StateBackend; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/BucketedTieredMergePolicyTest.java b/src/test/java/com/yelp/nrtsearch/server/index/BucketedTieredMergePolicyTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/index/BucketedTieredMergePolicyTest.java rename to src/test/java/com/yelp/nrtsearch/server/index/BucketedTieredMergePolicyTest.java index e9e4a6c0c..8b8334552 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/BucketedTieredMergePolicyTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/index/BucketedTieredMergePolicyTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -21,6 +21,7 @@ import static org.mockito.Mockito.mock; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; @@ -28,7 +29,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/DirectoryFactoryTest.java b/src/test/java/com/yelp/nrtsearch/server/index/DirectoryFactoryTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/index/DirectoryFactoryTest.java rename to src/test/java/com/yelp/nrtsearch/server/index/DirectoryFactoryTest.java index 3cd78ae97..a0ed35119 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/DirectoryFactoryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/index/DirectoryFactoryTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/FieldUpdateUtilsTest.java b/src/test/java/com/yelp/nrtsearch/server/index/FieldUpdateUtilsTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/index/FieldUpdateUtilsTest.java rename to src/test/java/com/yelp/nrtsearch/server/index/FieldUpdateUtilsTest.java index e48520605..a430a222e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/FieldUpdateUtilsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/index/FieldUpdateUtilsTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -27,27 +27,27 @@ import static org.mockito.Mockito.when; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.field.AtomFieldDef; +import com.yelp.nrtsearch.server.field.BooleanFieldDef; +import com.yelp.nrtsearch.server.field.DoubleFieldDef; +import com.yelp.nrtsearch.server.field.FieldDefCreator; +import com.yelp.nrtsearch.server.field.FloatFieldDef; +import com.yelp.nrtsearch.server.field.IdFieldDef; +import com.yelp.nrtsearch.server.field.LongFieldDef; +import com.yelp.nrtsearch.server.field.ObjectFieldDef; +import com.yelp.nrtsearch.server.field.TextFieldDef; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; import com.yelp.nrtsearch.server.grpc.FacetType; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.FieldDefResponse; import com.yelp.nrtsearch.server.grpc.FieldType; import com.yelp.nrtsearch.server.grpc.Script; -import com.yelp.nrtsearch.server.luceneserver.field.AtomFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.BooleanFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.DoubleFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.field.FloatFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IdFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.LongFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.ObjectFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.TextFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.FieldUpdateUtils.UpdatedFieldInfo; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.index.FieldUpdateUtils.UpdatedFieldInfo; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.script.ScriptService; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/ImmutableIndexStateTest.java b/src/test/java/com/yelp/nrtsearch/server/index/ImmutableIndexStateTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/index/ImmutableIndexStateTest.java rename to src/test/java/com/yelp/nrtsearch/server/index/ImmutableIndexStateTest.java index 3220d4125..934d471b5 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/index/ImmutableIndexStateTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/index/ImmutableIndexStateTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.index; +package com.yelp.nrtsearch.server.index; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -38,6 +38,11 @@ import com.google.protobuf.UInt64Value; import com.yelp.nrtsearch.server.config.IndexPreloadConfig; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.field.AtomFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDefCreator; +import com.yelp.nrtsearch.server.field.IdFieldDef; +import com.yelp.nrtsearch.server.field.IntFieldDef; import com.yelp.nrtsearch.server.grpc.Field; import com.yelp.nrtsearch.server.grpc.FieldType; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; @@ -47,17 +52,12 @@ import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; import com.yelp.nrtsearch.server.grpc.SortFields; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.field.AtomFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.field.IdFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IntFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.FieldUpdateUtils.UpdatedFieldInfo; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.FieldUpdateUtils.UpdatedFieldInfo; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/innerhit/innerHitTest.java b/src/test/java/com/yelp/nrtsearch/server/innerhit/innerHitTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/innerhit/innerHitTest.java rename to src/test/java/com/yelp/nrtsearch/server/innerhit/innerHitTest.java index 0b85e89de..5ca754888 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/innerhit/innerHitTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/innerhit/innerHitTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.innerhit; +package com.yelp.nrtsearch.server.innerhit; import static org.assertj.core.api.AssertionsForClassTypes.*; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/logging/HitsLoggerCreatorTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/logging/HitsLoggerCreatorTest.java index 665530832..04ce66e61 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/logging/HitsLoggerCreatorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.logging; +package com.yelp.nrtsearch.server.logging; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThrows; @@ -24,9 +24,9 @@ import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.LoggingHits; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; import com.yelp.nrtsearch.server.plugins.HitsLoggerPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.search.SearchContext; import java.io.ByteArrayInputStream; import java.util.Collections; import java.util.List; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerTest.java b/src/test/java/com/yelp/nrtsearch/server/logging/HitsLoggerTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerTest.java rename to src/test/java/com/yelp/nrtsearch/server/logging/HitsLoggerTest.java index 2594424c2..0f5474554 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/logging/HitsLoggerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/logging/HitsLoggerTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.logging; +package com.yelp.nrtsearch.server.logging; import static org.junit.Assert.assertEquals; import com.google.protobuf.Struct; import com.google.protobuf.Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -27,10 +28,9 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; import com.yelp.nrtsearch.server.plugins.HitsLoggerPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.search.SearchContext; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollectorTest.java b/src/test/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollectorTest.java index 29575a256..899ced2a6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollectorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/monitoring/DirSizeCollectorTest.java @@ -22,7 +22,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.prometheus.metrics.model.snapshots.DataPointSnapshot; import io.prometheus.metrics.model.snapshots.GaugeSnapshot; import io.prometheus.metrics.model.snapshots.Labels; diff --git a/src/test/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollectorTest.java b/src/test/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollectorTest.java index 0c74ff7be..b2c34bc64 100644 --- a/src/test/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollectorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/monitoring/MergeSchedulerCollectorTest.java @@ -21,9 +21,9 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.prometheus.metrics.model.snapshots.GaugeSnapshot; import io.prometheus.metrics.model.snapshots.MetricSnapshot; import io.prometheus.metrics.model.snapshots.MetricSnapshots; diff --git a/src/test/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollectorTest.java b/src/test/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollectorTest.java index db946c3b2..7498d08de 100644 --- a/src/test/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollectorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/monitoring/SearchResponseCollectorTest.java @@ -22,8 +22,8 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics; import com.yelp.nrtsearch.server.grpc.TotalHits; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.state.GlobalState; import io.prometheus.metrics.model.snapshots.MetricSnapshot; import io.prometheus.metrics.model.snapshots.MetricSnapshots; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/DefaultCopyThreadTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/DefaultCopyThreadTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/DefaultCopyThreadTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/DefaultCopyThreadTest.java index e0a4bd56e..872223298 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/DefaultCopyThreadTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/DefaultCopyThreadTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.*; import static org.mockito.Mockito.mock; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtDataManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/NrtDataManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtDataManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/NrtDataManagerTest.java index 703ccd264..49db603eb 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtDataManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/NrtDataManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -34,8 +34,8 @@ import static org.mockito.Mockito.when; import com.yelp.nrtsearch.server.grpc.RestoreIndex; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtFileMetaData; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtFileMetaData; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.utils.TimeStringUtils; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtReplicaNodeTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/NrtReplicaNodeTest.java similarity index 95% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtReplicaNodeTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/NrtReplicaNodeTest.java index 7b660a7f4..306467893 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/NrtReplicaNodeTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/NrtReplicaNodeTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/PrimaryNodeReferenceManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/PrimaryNodeReferenceManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/PrimaryNodeReferenceManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/PrimaryNodeReferenceManagerTest.java index fc23eb488..d648e1edd 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/PrimaryNodeReferenceManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/PrimaryNodeReferenceManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/ProportionalCopyThreadTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/ProportionalCopyThreadTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/ProportionalCopyThreadTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/ProportionalCopyThreadTest.java index 08870ea88..3442be36b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/ProportionalCopyThreadTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/ProportionalCopyThreadTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.*; import static org.mockito.Mockito.mock; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/RefreshUploadFutureTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/RefreshUploadFutureTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/RefreshUploadFutureTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/RefreshUploadFutureTest.java index e671e7703..1cce4eb41 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/RefreshUploadFutureTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/RefreshUploadFutureTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/SimpleCopyJobTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/SimpleCopyJobTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/SimpleCopyJobTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/SimpleCopyJobTest.java index 475d1239a..34217ed2b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/SimpleCopyJobTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/SimpleCopyJobTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt; +package com.yelp.nrtsearch.server.nrt; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -30,7 +30,7 @@ import com.google.protobuf.ByteString; import com.yelp.nrtsearch.server.grpc.FileInfo; import com.yelp.nrtsearch.server.grpc.RawFileChunk; -import com.yelp.nrtsearch.server.luceneserver.nrt.SimpleCopyJob.FileChunkStreamingIterator; +import com.yelp.nrtsearch.server.nrt.SimpleCopyJob.FileChunkStreamingIterator; import io.grpc.stub.StreamObserver; import java.util.Arrays; import java.util.List; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtFileMetaDataTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/state/NrtFileMetaDataTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtFileMetaDataTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/state/NrtFileMetaDataTest.java index 0dc6486e1..91934bf97 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtFileMetaDataTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/state/NrtFileMetaDataTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt.state; +package com.yelp.nrtsearch.server.nrt.state; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtPointStateTest.java b/src/test/java/com/yelp/nrtsearch/server/nrt/state/NrtPointStateTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtPointStateTest.java rename to src/test/java/com/yelp/nrtsearch/server/nrt/state/NrtPointStateTest.java index bcd0de902..f6a4554eb 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/nrt/state/NrtPointStateTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/nrt/state/NrtPointStateTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.nrt.state; +package com.yelp.nrtsearch.server.nrt.state; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/plugins/PluginS3DownloadTest.java b/src/test/java/com/yelp/nrtsearch/server/plugins/PluginS3DownloadTest.java index 14094b3a1..75690fea9 100644 --- a/src/test/java/com/yelp/nrtsearch/server/plugins/PluginS3DownloadTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/plugins/PluginS3DownloadTest.java @@ -26,6 +26,7 @@ import java.nio.file.Paths; import java.util.List; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; /** @@ -58,6 +59,7 @@ protected List getPlugins() { return List.of(path); } + @Ignore("Fix and enable this after the new server artifact is published") @Test public void testPluginS3Path() { assertTrue(Files.exists(getPluginSearchPath().resolve("example-plugin-0.0.1"))); diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/ConstantScoreQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/ConstantScoreQueryTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/ConstantScoreQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/ConstantScoreQueryTest.java index 9a15fe79f..0bd9cd542 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/ConstantScoreQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/ConstantScoreQueryTest.java @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.ConstantScoreQuery; @@ -27,7 +28,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchCrossFieldsQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/MatchCrossFieldsQueryTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchCrossFieldsQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/MatchCrossFieldsQueryTest.java index 69fab2bd9..48f0a7bbc 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchCrossFieldsQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/MatchCrossFieldsQueryTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.Analyzer; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.MatchOperator; @@ -28,7 +29,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchPhrasePrefixQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/MatchPhrasePrefixQueryTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchPhrasePrefixQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/MatchPhrasePrefixQueryTest.java index dfc1e9093..dc9d14a46 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchPhrasePrefixQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/MatchPhrasePrefixQueryTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.Analyzer; @@ -28,7 +29,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchQueryBuilderTest.java b/src/test/java/com/yelp/nrtsearch/server/query/MatchQueryBuilderTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchQueryBuilderTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/MatchQueryBuilderTest.java index bfdc1e50b..afe797d85 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MatchQueryBuilderTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/MatchQueryBuilderTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MultiMatchPhrasePrefixQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/MultiMatchPhrasePrefixQueryTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MultiMatchPhrasePrefixQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/MultiMatchPhrasePrefixQueryTest.java index b7d54afab..947963ad1 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/MultiMatchPhrasePrefixQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/MultiMatchPhrasePrefixQueryTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.Analyzer; @@ -27,7 +28,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/PrefixQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/PrefixQueryTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/PrefixQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/PrefixQueryTest.java index 490fc9975..b2251659e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/PrefixQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/PrefixQueryTest.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -28,8 +29,7 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexState; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/QueryNodeMapperTest.java b/src/test/java/com/yelp/nrtsearch/server/query/QueryNodeMapperTest.java similarity index 91% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/QueryNodeMapperTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/QueryNodeMapperTest.java index 30274989c..d216bc577 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/QueryNodeMapperTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/QueryNodeMapperTest.java @@ -13,26 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.SearchResponse.Diagnostics; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.script.ScoreScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptService; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; -import com.yelp.nrtsearch.server.luceneserver.search.SearchRequestProcessor; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; +import com.yelp.nrtsearch.server.script.ScoreScript; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; +import com.yelp.nrtsearch.server.script.ScriptService; +import com.yelp.nrtsearch.server.search.SearchContext; +import com.yelp.nrtsearch.server.search.SearchRequestProcessor; import io.grpc.testing.GrpcCleanupRule; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/SpanQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/SpanQueryTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/SpanQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/SpanQueryTest.java index c6b436309..2fa0cd51c 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/SpanQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/SpanQueryTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query; +package com.yelp.nrtsearch.server.query; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/MultiFunctionScoreQueryTest.java b/src/test/java/com/yelp/nrtsearch/server/query/multifunction/MultiFunctionScoreQueryTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/MultiFunctionScoreQueryTest.java rename to src/test/java/com/yelp/nrtsearch/server/query/multifunction/MultiFunctionScoreQueryTest.java index 10a1c5639..602a6674b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/query/multifunction/MultiFunctionScoreQueryTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/query/multifunction/MultiFunctionScoreQueryTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.query.multifunction; +package com.yelp.nrtsearch.server.query.multifunction; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThrows; import com.google.type.LatLng; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -31,8 +32,7 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/remote/RemoteUtilsTest.java b/src/test/java/com/yelp/nrtsearch/server/remote/RemoteUtilsTest.java index fc92d8b4e..214dbb2d7 100644 --- a/src/test/java/com/yelp/nrtsearch/server/remote/RemoteUtilsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/remote/RemoteUtilsTest.java @@ -17,7 +17,7 @@ import static org.junit.Assert.assertArrayEquals; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointStateTest; +import com.yelp.nrtsearch.server.nrt.state.NrtPointStateTest; import java.io.IOException; import java.nio.charset.StandardCharsets; import org.junit.Test; diff --git a/src/test/java/com/yelp/nrtsearch/server/remote/s3/S3BackendTest.java b/src/test/java/com/yelp/nrtsearch/server/remote/s3/S3BackendTest.java index 233a630ec..d9242431f 100644 --- a/src/test/java/com/yelp/nrtsearch/server/remote/s3/S3BackendTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/remote/s3/S3BackendTest.java @@ -28,8 +28,8 @@ import com.amazonaws.services.s3.model.UploadPartRequest; import com.amazonaws.services.s3.model.UploadPartResult; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtFileMetaData; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtFileMetaData; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteBackend.IndexResourceType; import com.yelp.nrtsearch.server.remote.RemoteUtils; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/rescore/RescorerCreatorTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/rescore/RescorerCreatorTest.java index c21111b49..4bddd5584 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/rescore/RescorerCreatorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerTest.java b/src/test/java/com/yelp/nrtsearch/server/rescore/RescorerTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerTest.java rename to src/test/java/com/yelp/nrtsearch/server/rescore/RescorerTest.java index 3f7f439d6..78790d54b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/rescore/RescorerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/rescore/RescorerTest.java @@ -13,13 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.rescore; +package com.yelp.nrtsearch.server.rescore; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.PluginRescorer; @@ -28,9 +31,6 @@ import com.yelp.nrtsearch.server.grpc.Rescorer; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.RescorerPlugin; import io.grpc.StatusRuntimeException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScoreScriptTest.java b/src/test/java/com/yelp/nrtsearch/server/script/ScoreScriptTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScoreScriptTest.java rename to src/test/java/com/yelp/nrtsearch/server/script/ScoreScriptTest.java index af2603993..721118e34 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScoreScriptTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/script/ScoreScriptTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; import static com.yelp.nrtsearch.server.grpc.GrpcServer.rmDir; import static org.junit.Assert.assertEquals; @@ -24,6 +24,10 @@ import com.google.common.primitives.Floats; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.doc.LoadedDocValues.SingleVector; +import com.yelp.nrtsearch.server.geo.GeoPoint; import com.yelp.nrtsearch.server.grpc.AddDocumentResponse; import com.yelp.nrtsearch.server.grpc.FunctionScoreQuery; import com.yelp.nrtsearch.server.grpc.GrpcServer; @@ -35,10 +39,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.VirtualField; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues.SingleVector; -import com.yelp.nrtsearch.server.luceneserver.geo.GeoPoint; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; import com.yelp.nrtsearch.server.utils.LuceneServerTestConfigurationFactory; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptContextTest.java b/src/test/java/com/yelp/nrtsearch/server/script/ScriptContextTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptContextTest.java rename to src/test/java/com/yelp/nrtsearch/server/script/ScriptContextTest.java index c3c49d5c9..b22b06d1b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptContextTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/script/ScriptContextTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptServiceTest.java b/src/test/java/com/yelp/nrtsearch/server/script/ScriptServiceTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptServiceTest.java rename to src/test/java/com/yelp/nrtsearch/server/script/ScriptServiceTest.java index 9fe858939..a46ca31f0 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/ScriptServiceTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/script/ScriptServiceTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script; +package com.yelp.nrtsearch.server.script; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptBindingsTest.java b/src/test/java/com/yelp/nrtsearch/server/script/js/JsScriptBindingsTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptBindingsTest.java rename to src/test/java/com/yelp/nrtsearch/server/script/js/JsScriptBindingsTest.java index ee284fd02..47693a10a 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptBindingsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/script/js/JsScriptBindingsTest.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script.js; +package com.yelp.nrtsearch.server.script.js; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefBindings; -import com.yelp.nrtsearch.server.luceneserver.field.VirtualFieldDef; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FieldDefBindings; +import com.yelp.nrtsearch.server.field.VirtualFieldDef; import java.io.IOException; import java.util.Collections; import java.util.HashMap; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptEngineTest.java b/src/test/java/com/yelp/nrtsearch/server/script/js/JsScriptEngineTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptEngineTest.java rename to src/test/java/com/yelp/nrtsearch/server/script/js/JsScriptEngineTest.java index c41de4362..37515337d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/script/js/JsScriptEngineTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/script/js/JsScriptEngineTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.script.js; +package com.yelp.nrtsearch.server.script.js; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.FunctionScoreQuery; import com.yelp.nrtsearch.server.grpc.MatchQuery; @@ -25,7 +26,6 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.VirtualField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/search/FetchTaskCreatorTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/FetchTaskCreatorTest.java index af8e13105..83084cfe9 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTaskCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/FetchTaskCreatorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTasksTest.java b/src/test/java/com/yelp/nrtsearch/server/search/FetchTasksTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTasksTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/FetchTasksTest.java index 9b21fe017..7103a8f76 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/FetchTasksTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/FetchTasksTest.java @@ -13,11 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FetchTask; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -27,10 +31,6 @@ import com.yelp.nrtsearch.server.grpc.Script; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; import com.yelp.nrtsearch.server.plugins.FetchTaskPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; import io.grpc.testing.GrpcCleanupRule; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/GlobalOrdinalLookupTest.java b/src/test/java/com/yelp/nrtsearch/server/search/GlobalOrdinalLookupTest.java similarity index 94% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/GlobalOrdinalLookupTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/GlobalOrdinalLookupTest.java index bbcc8959e..1026a0886 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/GlobalOrdinalLookupTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/GlobalOrdinalLookupTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -22,13 +22,13 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.properties.GlobalOrdinalable; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.properties.GlobalOrdinalable; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.stream.Stream; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcherTest.java b/src/test/java/com/yelp/nrtsearch/server/search/MyIndexSearcherTest.java similarity index 95% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcherTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/MyIndexSearcherTest.java index dc03f5628..418f49044 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcherTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/MyIndexSearcherTest.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.LiveSettingsRequest; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.search.MyIndexSearcher.ExecutorWithParams; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.search.MyIndexSearcher.ExecutorWithParams; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcherVirtualShardsTest.java b/src/test/java/com/yelp/nrtsearch/server/search/MyIndexSearcherVirtualShardsTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcherVirtualShardsTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/MyIndexSearcherVirtualShardsTest.java index 8c968a2ce..95b242a63 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/MyIndexSearcherVirtualShardsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/MyIndexSearcherVirtualShardsTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; +import com.yelp.nrtsearch.server.index.ShardState; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchContextTest.java b/src/test/java/com/yelp/nrtsearch/server/search/SearchContextTest.java similarity index 93% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchContextTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/SearchContextTest.java index 878169428..5455d908c 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchContextTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/SearchContextTest.java @@ -13,18 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; +import com.yelp.nrtsearch.server.ServerTestCase; +import com.yelp.nrtsearch.server.doc.DefaultSharedDocContext; +import com.yelp.nrtsearch.server.doc.DocLookup; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder; import com.yelp.nrtsearch.server.grpc.SearchResponse.SearchState; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.DefaultSharedDocContext; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.DocCollector; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.search.collectors.DocCollector; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCutoffWrapperTest.java b/src/test/java/com/yelp/nrtsearch/server/search/SearchCutoffWrapperTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCutoffWrapperTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/SearchCutoffWrapperTest.java index 9dd11eee6..7a6ff390d 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchCutoffWrapperTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/SearchCutoffWrapperTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCutoffWrapper.CollectionTimeoutException; +import com.yelp.nrtsearch.server.search.SearchCutoffWrapper.CollectionTimeoutException; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchStatsWrapperTest.java b/src/test/java/com/yelp/nrtsearch/server/search/SearchStatsWrapperTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchStatsWrapperTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/SearchStatsWrapperTest.java index a4f97a13b..352b402c1 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/SearchStatsWrapperTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/SearchStatsWrapperTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Facet; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -28,7 +29,6 @@ import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/TerminateAfterWrapperTest.java b/src/test/java/com/yelp/nrtsearch/server/search/TerminateAfterWrapperTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/TerminateAfterWrapperTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/TerminateAfterWrapperTest.java index 7254b1fd9..ff4b90b78 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/TerminateAfterWrapperTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/TerminateAfterWrapperTest.java @@ -13,20 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search; +package com.yelp.nrtsearch.server.search; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexState; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreatorTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreatorTest.java index a49d7ff60..03f996cc8 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/CollectorCreatorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/CollectorTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/CollectorTest.java index 7c5c68887..61eaab8e4 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/CollectorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/CollectorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -23,7 +23,10 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Struct; import com.google.protobuf.Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.LoadedDocValues; +import com.yelp.nrtsearch.server.field.IndexableFieldDef; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Collector; import com.yelp.nrtsearch.server.grpc.CollectorResult; @@ -34,13 +37,10 @@ import com.yelp.nrtsearch.server.grpc.Script; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.LoadedDocValues; -import com.yelp.nrtsearch.server.luceneserver.field.IndexableFieldDef; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.search.SearchContext; +import com.yelp.nrtsearch.server.handler.SearchHandler; import com.yelp.nrtsearch.server.plugins.CollectorPlugin; import com.yelp.nrtsearch.server.plugins.Plugin; +import com.yelp.nrtsearch.server.search.SearchContext; import io.grpc.StatusRuntimeException; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/DocCollectorTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/DocCollectorTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/DocCollectorTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/DocCollectorTest.java index 34e4581a7..7de62e096 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/DocCollectorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/DocCollectorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; @@ -24,11 +24,11 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder; import com.yelp.nrtsearch.server.grpc.SearchResponse.SearchState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCollectorManager; -import com.yelp.nrtsearch.server.luceneserver.search.SearchCutoffWrapper; -import com.yelp.nrtsearch.server.luceneserver.search.SearchStatsWrapper; -import com.yelp.nrtsearch.server.luceneserver.search.TerminateAfterWrapper; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.search.SearchCollectorManager; +import com.yelp.nrtsearch.server.search.SearchCutoffWrapper; +import com.yelp.nrtsearch.server.search.SearchStatsWrapper; +import com.yelp.nrtsearch.server.search.TerminateAfterWrapper; import java.io.IOException; import java.util.Collection; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/MyTopSuggestDocsCollectorTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/MyTopSuggestDocsCollectorTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/MyTopSuggestDocsCollectorTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/MyTopSuggestDocsCollectorTest.java index 07e6be26a..e86e610c6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/MyTopSuggestDocsCollectorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/MyTopSuggestDocsCollectorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors; +package com.yelp.nrtsearch.server.search.collectors; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/CollectorStatsWrapperTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/CollectorStatsWrapperTest.java similarity index 95% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/CollectorStatsWrapperTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/CollectorStatsWrapperTest.java index 8637e0b52..a8e1aa544 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/CollectorStatsWrapperTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/CollectorStatsWrapperTest.java @@ -13,13 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Collector; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; @@ -31,13 +33,11 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermsCollector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; +import com.yelp.nrtsearch.server.script.FacetScript; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/DoubleTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/DoubleTermsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/DoubleTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/DoubleTermsCollectorManagerTest.java index 49914df99..0544d6e3a 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/DoubleTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/DoubleTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FilterCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/FilterCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FilterCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/FilterCollectorManagerTest.java index 6c3706a34..ca37a685b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FilterCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/FilterCollectorManagerTest.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.BucketResult; @@ -48,8 +49,7 @@ import com.yelp.nrtsearch.server.grpc.TermInSetQuery.TextTerms; import com.yelp.nrtsearch.server.grpc.TermsCollector; import com.yelp.nrtsearch.server.grpc.TopHitsCollector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FloatTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/FloatTermsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FloatTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/FloatTermsCollectorManagerTest.java index 51c1c185b..b3da9520f 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/FloatTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/FloatTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/IntTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/IntTermsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/IntTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/IntTermsCollectorManagerTest.java index f7eb6e61e..60453b10c 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/IntTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/IntTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LongTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/LongTermsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LongTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/LongTermsCollectorManagerTest.java index ccc5c8ffa..8636ddccf 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/LongTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/LongTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MaxCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/MaxCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MaxCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/MaxCollectorManagerTest.java index 022efa925..2d36c4083 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MaxCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/MaxCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MinCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/MinCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MinCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/MinCollectorManagerTest.java index ace41eff7..7865c4d12 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/MinCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/MinCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.*; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectionTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectionTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectionTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectionTest.java index 47313435e..adc3580d6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectionTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectionTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.BucketResult; import com.yelp.nrtsearch.server.grpc.BucketResult.Bucket; @@ -34,8 +35,7 @@ import com.yelp.nrtsearch.server.grpc.TermsCollector; import com.yelp.nrtsearch.server.grpc.TopHitsCollector; import com.yelp.nrtsearch.server.grpc.TotalHits.Relation; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectorOrderTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectorOrderTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectorOrderTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectorOrderTest.java index dca0d85a3..b7c458816 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/NestedCollectorOrderTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/NestedCollectorOrderTest.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.BucketOrder; @@ -38,8 +39,7 @@ import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermsCollector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/OrdinalTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/OrdinalTermsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/OrdinalTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/OrdinalTermsCollectorManagerTest.java index e759b5bf3..143b60e93 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/OrdinalTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/OrdinalTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptTermsCollectorManagerTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptTermsCollectorManagerTest.java index 67fc4670e..f1900dc28 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/ScriptTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/ScriptTermsCollectorManagerTest.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; import static org.junit.Assert.assertEquals; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.doc.DocLookup; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.BucketOrder; import com.yelp.nrtsearch.server.grpc.BucketOrder.OrderType; @@ -27,13 +28,12 @@ import com.yelp.nrtsearch.server.grpc.Script; import com.yelp.nrtsearch.server.grpc.SearchResponse; import com.yelp.nrtsearch.server.grpc.TermsCollector; -import com.yelp.nrtsearch.server.luceneserver.doc.DocLookup; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript; -import com.yelp.nrtsearch.server.luceneserver.script.FacetScript.SegmentFactory; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptContext; -import com.yelp.nrtsearch.server.luceneserver.script.ScriptEngine; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.ScriptPlugin; +import com.yelp.nrtsearch.server.script.FacetScript; +import com.yelp.nrtsearch.server.script.FacetScript.SegmentFactory; +import com.yelp.nrtsearch.server.script.ScriptContext; +import com.yelp.nrtsearch.server.script.ScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Arrays; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/StringTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/StringTermsCollectorManagerTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/StringTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/StringTermsCollectorManagerTest.java index 8004aab45..7e6921fec 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/StringTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/StringTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManagerTest.java similarity index 91% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManagerTest.java index ed61068ff..4758afeb6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManagerTest.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.collectors.BucketOrder; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.TermsCollector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.search.collectors.CollectorCreatorContext; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.search.collectors.CollectorCreatorContext; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManagerTestsBase.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManagerTestsBase.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManagerTestsBase.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManagerTestsBase.java index 7c0c9c7c8..4df136cf8 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TermsCollectorManagerTestsBase.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TermsCollectorManagerTestsBase.java @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.BucketOrder; import com.yelp.nrtsearch.server.grpc.BucketOrder.OrderType; @@ -35,8 +36,7 @@ import com.yelp.nrtsearch.server.grpc.SearchResponse.Hit; import com.yelp.nrtsearch.server.grpc.TermsCollector; import com.yelp.nrtsearch.server.grpc.TopHitsCollector; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TopHitsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TopHitsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TopHitsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TopHitsCollectorManagerTest.java index f0649f9bc..0a624a112 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/TopHitsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/TopHitsCollectorManagerTest.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.Collector; import com.yelp.nrtsearch.server.grpc.CollectorResult; @@ -35,8 +36,7 @@ import com.yelp.nrtsearch.server.grpc.TopHitsCollector; import com.yelp.nrtsearch.server.grpc.TotalHits.Relation; import com.yelp.nrtsearch.server.grpc.VirtualField; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/VirtualTermsCollectorManagerTest.java b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/VirtualTermsCollectorManagerTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/VirtualTermsCollectorManagerTest.java rename to src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/VirtualTermsCollectorManagerTest.java index 0a2c22333..d0cd20c03 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/search/collectors/additional/VirtualTermsCollectorManagerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/search/collectors/additional/VirtualTermsCollectorManagerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.search.collectors.additional; +package com.yelp.nrtsearch.server.search.collectors.additional; import static com.yelp.nrtsearch.server.collectors.BucketOrder.COUNT; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityCreatorTest.java b/src/test/java/com/yelp/nrtsearch/server/similarity/SimilarityCreatorTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityCreatorTest.java rename to src/test/java/com/yelp/nrtsearch/server/similarity/SimilarityCreatorTest.java index 68ee6a56d..e1afb7064 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityCreatorTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/similarity/SimilarityCreatorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.similarity; +package com.yelp.nrtsearch.server.similarity; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityTest.java b/src/test/java/com/yelp/nrtsearch/server/similarity/SimilarityTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityTest.java rename to src/test/java/com/yelp/nrtsearch/server/similarity/SimilarityTest.java index d356584ca..1d902eb9e 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/similarity/SimilarityTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/similarity/SimilarityTest.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.similarity; +package com.yelp.nrtsearch.server.similarity; import static org.junit.Assert.assertEquals; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest; import com.yelp.nrtsearch.server.grpc.AddDocumentRequest.MultiValuedField; import com.yelp.nrtsearch.server.grpc.FieldDefRequest; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.SearchResponse; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.plugins.SimilarityPlugin; import io.grpc.testing.GrpcCleanupRule; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/BackendGlobalStateTest.java b/src/test/java/com/yelp/nrtsearch/server/state/BackendGlobalStateTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/state/BackendGlobalStateTest.java rename to src/test/java/com/yelp/nrtsearch/server/state/BackendGlobalStateTest.java index 40a370368..450854bf6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/BackendGlobalStateTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/state/BackendGlobalStateTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state; +package com.yelp.nrtsearch.server.state; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; @@ -29,7 +29,9 @@ import static org.mockito.Mockito.when; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.concurrent.ThreadPoolExecutorFactory; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; +import com.yelp.nrtsearch.server.field.FieldDefCreator; import com.yelp.nrtsearch.server.grpc.GlobalStateInfo; import com.yelp.nrtsearch.server.grpc.IndexGlobalState; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; @@ -37,18 +39,16 @@ import com.yelp.nrtsearch.server.grpc.ReplicationServerClient; import com.yelp.nrtsearch.server.grpc.StartIndexRequest; import com.yelp.nrtsearch.server.grpc.StopIndexRequest; -import com.yelp.nrtsearch.server.luceneserver.concurrent.ThreadPoolExecutorFactory; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDefCreator; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; -import com.yelp.nrtsearch.server.luceneserver.index.IndexStateManager; -import com.yelp.nrtsearch.server.luceneserver.index.ShardState; -import com.yelp.nrtsearch.server.luceneserver.nrt.NrtDataManager; -import com.yelp.nrtsearch.server.luceneserver.similarity.SimilarityCreator; -import com.yelp.nrtsearch.server.luceneserver.state.backend.LocalStateBackend; -import com.yelp.nrtsearch.server.luceneserver.state.backend.RemoteStateBackend; -import com.yelp.nrtsearch.server.luceneserver.state.backend.StateBackend; +import com.yelp.nrtsearch.server.index.IndexState; +import com.yelp.nrtsearch.server.index.IndexStateManager; +import com.yelp.nrtsearch.server.index.ShardState; +import com.yelp.nrtsearch.server.nrt.NrtDataManager; import com.yelp.nrtsearch.server.plugins.Plugin; import com.yelp.nrtsearch.server.remote.RemoteBackend; +import com.yelp.nrtsearch.server.similarity.SimilarityCreator; +import com.yelp.nrtsearch.server.state.backend.LocalStateBackend; +import com.yelp.nrtsearch.server.state.backend.RemoteStateBackend; +import com.yelp.nrtsearch.server.state.backend.StateBackend; import java.io.ByteArrayInputStream; import java.io.IOException; import java.nio.file.Path; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/GlobalStateTest.java b/src/test/java/com/yelp/nrtsearch/server/state/GlobalStateTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/state/GlobalStateTest.java rename to src/test/java/com/yelp/nrtsearch/server/state/GlobalStateTest.java index 7206bcb75..316cbe07f 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/GlobalStateTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/state/GlobalStateTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state; +package com.yelp.nrtsearch.server.state; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/StateUtilsTest.java b/src/test/java/com/yelp/nrtsearch/server/state/StateUtilsTest.java similarity index 99% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/state/StateUtilsTest.java rename to src/test/java/com/yelp/nrtsearch/server/state/StateUtilsTest.java index 7b68b667f..f3ec83611 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/StateUtilsTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/state/StateUtilsTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state; +package com.yelp.nrtsearch.server.state; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/backend/LocalStateBackendTest.java b/src/test/java/com/yelp/nrtsearch/server/state/backend/LocalStateBackendTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/state/backend/LocalStateBackendTest.java rename to src/test/java/com/yelp/nrtsearch/server/state/backend/LocalStateBackendTest.java index e72eeb910..d847d3ae6 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/backend/LocalStateBackendTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/state/backend/LocalStateBackendTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state.backend; +package com.yelp.nrtsearch.server.state.backend; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -36,9 +36,9 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.SortFields; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import java.io.ByteArrayInputStream; import java.io.IOException; import java.nio.file.Path; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/backend/RemoteStateBackendTest.java b/src/test/java/com/yelp/nrtsearch/server/state/backend/RemoteStateBackendTest.java similarity index 98% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/state/backend/RemoteStateBackendTest.java rename to src/test/java/com/yelp/nrtsearch/server/state/backend/RemoteStateBackendTest.java index 714a08688..b7348dbbb 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/state/backend/RemoteStateBackendTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/state/backend/RemoteStateBackendTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.state.backend; +package com.yelp.nrtsearch.server.state.backend; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -37,11 +37,11 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.SortFields; import com.yelp.nrtsearch.server.grpc.SortType; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.GlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.GlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import com.yelp.nrtsearch.test_utils.AmazonS3Provider; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/server/utils/MinMaxUtilTest.java b/src/test/java/com/yelp/nrtsearch/server/utils/MinMaxUtilTest.java index db57dfa56..2c438b66b 100644 --- a/src/test/java/com/yelp/nrtsearch/server/utils/MinMaxUtilTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/utils/MinMaxUtilTest.java @@ -16,9 +16,9 @@ package com.yelp.nrtsearch.server.utils; import com.google.protobuf.Int32Value; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.*; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; -import com.yelp.nrtsearch.server.luceneserver.script.js.JsScriptEngine; +import com.yelp.nrtsearch.server.script.js.JsScriptEngine; import io.grpc.testing.GrpcCleanupRule; import java.io.IOException; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/vector/FloatVectorTypeTest.java b/src/test/java/com/yelp/nrtsearch/server/vector/FloatVectorTypeTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/vector/FloatVectorTypeTest.java rename to src/test/java/com/yelp/nrtsearch/server/vector/FloatVectorTypeTest.java index 6d7d23e30..0a367c6bc 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/vector/FloatVectorTypeTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/vector/FloatVectorTypeTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.vector; +package com.yelp.nrtsearch.server.vector; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/warming/ReservoirSamplerTest.java b/src/test/java/com/yelp/nrtsearch/server/warming/ReservoirSamplerTest.java similarity index 96% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/warming/ReservoirSamplerTest.java rename to src/test/java/com/yelp/nrtsearch/server/warming/ReservoirSamplerTest.java index 2f384139c..47c689596 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/warming/ReservoirSamplerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/warming/ReservoirSamplerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.warming; +package com.yelp.nrtsearch.server.warming; import static org.assertj.core.api.Assertions.assertThat; diff --git a/src/test/java/com/yelp/nrtsearch/server/luceneserver/warming/WarmerTest.java b/src/test/java/com/yelp/nrtsearch/server/warming/WarmerTest.java similarity index 97% rename from src/test/java/com/yelp/nrtsearch/server/luceneserver/warming/WarmerTest.java rename to src/test/java/com/yelp/nrtsearch/server/warming/WarmerTest.java index 6b0d18644..ec80719da 100644 --- a/src/test/java/com/yelp/nrtsearch/server/luceneserver/warming/WarmerTest.java +++ b/src/test/java/com/yelp/nrtsearch/server/warming/WarmerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.yelp.nrtsearch.server.luceneserver.warming; +package com.yelp.nrtsearch.server.warming; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -25,8 +25,8 @@ import com.yelp.nrtsearch.server.grpc.Query; import com.yelp.nrtsearch.server.grpc.SearchRequest; import com.yelp.nrtsearch.server.grpc.TermQuery; -import com.yelp.nrtsearch.server.luceneserver.handler.SearchHandler; -import com.yelp.nrtsearch.server.luceneserver.index.IndexState; +import com.yelp.nrtsearch.server.handler.SearchHandler; +import com.yelp.nrtsearch.server.index.IndexState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; import com.yelp.nrtsearch.test_utils.AmazonS3Provider; diff --git a/src/test/java/com/yelp/nrtsearch/test_utils/NrtsearchTest.java b/src/test/java/com/yelp/nrtsearch/test_utils/NrtsearchTest.java index e61eea031..0b9a0041f 100644 --- a/src/test/java/com/yelp/nrtsearch/test_utils/NrtsearchTest.java +++ b/src/test/java/com/yelp/nrtsearch/test_utils/NrtsearchTest.java @@ -20,6 +20,7 @@ import static com.yelp.nrtsearch.test_utils.DefaultTestProperties.S3_BUCKET_NAME; import com.amazonaws.services.s3.AmazonS3; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.config.LuceneServerConfiguration; import com.yelp.nrtsearch.server.grpc.LuceneServerClient; import java.io.ByteArrayInputStream; @@ -36,9 +37,9 @@ /** * Base class for tests which need to initialize an Nrtsearch instance. Unlike {@link - * com.yelp.nrtsearch.server.luceneserver.ServerTestCase} which directly creates a gRPC server using - * {@link com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl}, this class creates and - * starts {@link com.yelp.nrtsearch.server.grpc.LuceneServer} using a custom guice module ({@link + * ServerTestCase} which directly creates a gRPC server using {@link + * com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl}, this class creates and starts + * {@link com.yelp.nrtsearch.server.grpc.LuceneServer} using a custom guice module ({@link * com.yelp.nrtsearch.module.TestLuceneServerModule}. This class is useful for tests which require * testing the initialization path of {@link com.yelp.nrtsearch.server.grpc.LuceneServer}. */ diff --git a/src/test/java/com/yelp/nrtsearch/tools/cli/CreateIndexCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/cli/CreateIndexCommandTest.java index a513488db..962ad177a 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/cli/CreateIndexCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/cli/CreateIndexCommandTest.java @@ -21,14 +21,14 @@ import static org.junit.Assert.assertTrue; import com.yelp.nrtsearch.server.config.IndexStartConfig.IndexDataLocationType; +import com.yelp.nrtsearch.server.field.FieldDef; +import com.yelp.nrtsearch.server.field.FloatFieldDef; +import com.yelp.nrtsearch.server.field.LongFieldDef; import com.yelp.nrtsearch.server.grpc.IndexLiveSettings; import com.yelp.nrtsearch.server.grpc.IndexSettings; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.field.FieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.FloatFieldDef; -import com.yelp.nrtsearch.server.luceneserver.field.LongFieldDef; -import com.yelp.nrtsearch.server.luceneserver.index.ImmutableIndexState; +import com.yelp.nrtsearch.server.index.ImmutableIndexState; import java.io.IOException; import java.util.Map; import org.junit.After; diff --git a/src/test/java/com/yelp/nrtsearch/tools/cli/IndicesCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/cli/IndicesCommandTest.java index 7101da571..14b950dfa 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/cli/IndicesCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/cli/IndicesCommandTest.java @@ -17,8 +17,8 @@ import static org.junit.Assert.*; +import com.yelp.nrtsearch.server.ServerTestCase; import com.yelp.nrtsearch.server.grpc.CreateIndexRequest; -import com.yelp.nrtsearch.server.luceneserver.ServerTestCase; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.ArrayList; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotRestoreCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotRestoreCommandTest.java index 65e99cfa9..68be2b68d 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotRestoreCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/backup/SnapshotRestoreCommandTest.java @@ -38,12 +38,12 @@ import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.RestoreIndex; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; +import com.yelp.nrtsearch.server.state.StateUtils; import com.yelp.nrtsearch.server.utils.TimeStringUtils; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommandTest.java index e4d51b86e..3f33df932 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/cleanup/CleanupDataCommandTest.java @@ -32,7 +32,7 @@ import com.yelp.nrtsearch.server.config.IndexStartConfig.IndexDataLocationType; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.nrt.state.NrtPointState; +import com.yelp.nrtsearch.server.nrt.state.NrtPointState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.RemoteUtils; import com.yelp.nrtsearch.server.remote.s3.S3Backend; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetRemoteStateCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetRemoteStateCommandTest.java index af9c9b380..6fe7c1378 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetRemoteStateCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetRemoteStateCommandTest.java @@ -31,9 +31,9 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.index.ImmutableIndexState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; -import com.yelp.nrtsearch.server.luceneserver.state.backend.RemoteStateBackend; +import com.yelp.nrtsearch.server.index.ImmutableIndexState; +import com.yelp.nrtsearch.server.state.StateUtils; +import com.yelp.nrtsearch.server.state.backend.RemoteStateBackend; import java.io.File; import java.io.IOException; import java.nio.file.Files; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetResourceVersionCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetResourceVersionCommandTest.java index 62aa5b902..f05cbc971 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetResourceVersionCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/GetResourceVersionCommandTest.java @@ -27,9 +27,9 @@ import com.yelp.nrtsearch.server.config.IndexStartConfig; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/ListResourceVersionsTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/ListResourceVersionsTest.java index fa70dca65..c3cb17e2f 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/ListResourceVersionsTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/ListResourceVersionsTest.java @@ -28,9 +28,9 @@ import com.yelp.nrtsearch.server.config.IndexStartConfig; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/PutRemoteStateCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/PutRemoteStateCommandTest.java index 7aacc2791..1c9a6b612 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/PutRemoteStateCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/PutRemoteStateCommandTest.java @@ -36,10 +36,10 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.index.ImmutableIndexState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; -import com.yelp.nrtsearch.server.luceneserver.state.backend.RemoteStateBackend; +import com.yelp.nrtsearch.server.index.ImmutableIndexState; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.StateUtils; +import com.yelp.nrtsearch.server.state.backend.RemoteStateBackend; import java.io.File; import java.io.IOException; import java.nio.file.Files; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/SetResourceVersionCommandTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/SetResourceVersionCommandTest.java index cc5fddb6a..3c43472c6 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/SetResourceVersionCommandTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/SetResourceVersionCommandTest.java @@ -27,9 +27,9 @@ import com.yelp.nrtsearch.server.config.IndexStartConfig; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.state.BackendGlobalState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.BackendGlobalState; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; diff --git a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtilsTest.java b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtilsTest.java index 4840cad78..b608b224e 100644 --- a/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtilsTest.java +++ b/src/test/java/com/yelp/nrtsearch/tools/nrt_utils/state/StateCommandUtilsTest.java @@ -42,11 +42,11 @@ import com.yelp.nrtsearch.server.grpc.IndexStateInfo; import com.yelp.nrtsearch.server.grpc.Mode; import com.yelp.nrtsearch.server.grpc.TestServer; -import com.yelp.nrtsearch.server.luceneserver.index.ImmutableIndexState; -import com.yelp.nrtsearch.server.luceneserver.state.StateUtils; -import com.yelp.nrtsearch.server.luceneserver.state.backend.RemoteStateBackend; +import com.yelp.nrtsearch.server.index.ImmutableIndexState; import com.yelp.nrtsearch.server.remote.RemoteBackend; import com.yelp.nrtsearch.server.remote.s3.S3Backend; +import com.yelp.nrtsearch.server.state.StateUtils; +import com.yelp.nrtsearch.server.state.backend.RemoteStateBackend; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream;