Package org.fao.geonet.kernel.search

Examples of org.fao.geonet.kernel.search.LuceneConfig.commitInterval()


        GeonetworkDataDirectory datadir = Mockito.mock(GeonetworkDataDirectory.class);
        Mockito.when(datadir.getLuceneDir()).thenReturn(folder.getRoot());
        FSDirectoryFactory directoryFactory = new FSDirectoryFactory();
        directoryFactory.setDataDir(datadir);
        LuceneConfig luceneConfig = Mockito.mock(LuceneConfig.class);
        Mockito.when(luceneConfig.commitInterval()).thenReturn(1L);
        Mockito.when(luceneConfig.useNRTManagerReopenThread()).thenReturn(false);
        final LuceneIndexLanguageTracker tracker = new LuceneIndexLanguageTracker(directoryFactory, luceneConfig);

        final IndexAndTaxonomy acquire = addDocumentAndAssertCorrectlyAdded(tracker);
View Full Code Here


        GeonetworkDataDirectory datadir = Mockito.mock(GeonetworkDataDirectory.class);
        Mockito.when(datadir.getLuceneDir()).thenReturn(folder.getRoot());
        FSDirectoryFactory directoryFactory = new FSDirectoryFactory();
        directoryFactory.setDataDir(datadir);
        LuceneConfig luceneConfig = Mockito.mock(LuceneConfig.class);
        Mockito.when(luceneConfig.commitInterval()).thenReturn(1L);
        Mockito.when(luceneConfig.useNRTManagerReopenThread()).thenReturn(false);
        final LuceneIndexLanguageTracker tracker = new LuceneIndexLanguageTracker(directoryFactory, luceneConfig);

        addDocumentAndAssertCorrectlyAdded(tracker);
View Full Code Here

        final File root = folder.getRoot();
        Mockito.when(datadir.getLuceneDir()).thenReturn(root);
        FSDirectoryFactory directoryFactory = new FSDirectoryFactory();
        directoryFactory.setDataDir(datadir);
        LuceneConfig luceneConfig = Mockito.mock(LuceneConfig.class);
        Mockito.when(luceneConfig.commitInterval()).thenReturn(1L);
        Mockito.when(luceneConfig.useNRTManagerReopenThread()).thenReturn(false);

        createAndLockFilesAndResetTracker(directoryFactory, luceneConfig, true);

        assertEquals(FSDirectoryFactory.NON_SPATIAL_DIR + "_" + 1, directoryFactory.getIndexDir().getName());
View Full Code Here

        GeonetworkDataDirectory datadir = Mockito.mock(GeonetworkDataDirectory.class);
        Mockito.when(datadir.getLuceneDir()).thenReturn(folder.getRoot());
        FSDirectoryFactory directoryFactory = new FSDirectoryFactory();
        directoryFactory.setDataDir(datadir);
        LuceneConfig luceneConfig = Mockito.mock(LuceneConfig.class);
        Mockito.when(luceneConfig.commitInterval()).thenReturn(1L);
        Mockito.when(luceneConfig.useNRTManagerReopenThread()).thenReturn(false);
        final LuceneIndexLanguageTracker tracker = new LuceneIndexLanguageTracker(directoryFactory, luceneConfig);

        final IndexAndTaxonomy acquire = addDocumentAndAssertCorrectlyAdded(tracker);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.