tmpDir = com.flaptor.util.FileUtil.createTempDir("junit", ".tmp").getAbsolutePath();
// Configuration
Config.getConfig("common.properties").set("baseDir", tmpDir);
Config.getConfig("common.properties").set("port.base", "10000");
// indexer:
Config indexerConfig = Config.getConfig("indexer.properties");
indexerConfig.set("IndexManager.updateInterval", "4000");
indexerConfig.set("IndexLibrary.remoteIndexUpdaters","localhost:10000");
indexerConfig.set("IndexLibrary.rsyncAccessString","");
indexerConfig.set("Indexer.modules", "com.flaptor.hounder.indexer.Writer");
indexerConfig.set("Indexer.fields", "content");
indexerConfig.set("docIdName", "docId");
indexerConfig.set("Indexer.maxQueueSize", "100");
indexerConfig.set("Writer.fields","");
indexerConfig.set("clustering.enable","false");
// searcher:
Config searcherConfig = Config.getConfig("searcher.properties");
searcherConfig.set("compositeSearcher.useSpellCheckSuggestQuery", "false");
searcherConfig.set("QueryParser.searchFields", "content");
searcherConfig.set("QueryParser.searchFieldWeights", "1.0f");
searcherConfig.set("QueryParser.nonTokenizedFields", "");
searcherConfig.set("ReloadableIndexSearcher.minTimeBetweenIndexes", "1000");
searcherConfig.set("ReloadableIndexSearcher.sleepTime", "1000");
searcherConfig.set("clustering.enable", "false");
searcherConfig.set("SimilarityForwarder.scorers","");
//TODO see why it crashes if snippets are set
searcherConfig.set("Searcher.generateSnippets", "false");
indexer = new Indexer();
searcher = new CompositeSearcher();
baseSearcher = (Searcher)searcher.getBaseSearcher();