Search in sources :

Example 1 with LocalReplicator

use of org.apache.lucene.replicator.LocalReplicator in project lucene-solr by apache.

the class HttpReplicatorTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    if (VERBOSE) {
        // sets stderr logging to DEBUG level
        System.setProperty("org.eclipse.jetty.LEVEL", "DEBUG");
    }
    clientWorkDir = createTempDir("httpReplicatorTest");
    handlerIndexDir = newDirectory();
    serverIndexDir = newDirectory();
    serverReplicator = new LocalReplicator();
    startServer();
    IndexWriterConfig conf = newIndexWriterConfig(null);
    conf.setIndexDeletionPolicy(new SnapshotDeletionPolicy(conf.getIndexDeletionPolicy()));
    writer = new IndexWriter(serverIndexDir, conf);
    reader = DirectoryReader.open(writer);
}
Also used : IndexWriter(org.apache.lucene.index.IndexWriter) LocalReplicator(org.apache.lucene.replicator.LocalReplicator) SnapshotDeletionPolicy(org.apache.lucene.index.SnapshotDeletionPolicy) IndexWriterConfig(org.apache.lucene.index.IndexWriterConfig) Before(org.junit.Before)

Aggregations

IndexWriter (org.apache.lucene.index.IndexWriter)1 IndexWriterConfig (org.apache.lucene.index.IndexWriterConfig)1 SnapshotDeletionPolicy (org.apache.lucene.index.SnapshotDeletionPolicy)1 LocalReplicator (org.apache.lucene.replicator.LocalReplicator)1 Before (org.junit.Before)1