/// <summary>
        /// Sets the Centralized Lucene search engine as the current search engine.
        /// </summary>
        public static IRepositoryBuilder UseLucene29CentralizedSearchEngine(this IRepositoryBuilder repositoryBuilder)
        {
            var searchEngine = new Lucene29SearchEngine(
                new Lucene29CentralizedIndexingEngine(null, Options.Create(new CentralizedOptions())),
                new Lucene29CentralizedQueryEngine());

            repositoryBuilder.UseSearchEngine(searchEngine);

            return(repositoryBuilder);
        }
Example #2
0
        public static IRepositoryBuilder UseLucene29LocalSearchEngine(this IRepositoryBuilder repositoryBuilder, string indexDirectoryPath = null)
        {
            var indexDirectory = string.IsNullOrEmpty(indexDirectoryPath)
                ? null
                : new IndexDirectory(null, indexDirectoryPath);

            var searchEngine = new Lucene29SearchEngine(
                new Lucene29LocalIndexingEngine(indexDirectory),
                new Lucene29LocalQueryEngine());

            repositoryBuilder.UseSearchEngine(searchEngine);

            return(repositoryBuilder);
        }