public LuceneSearcher(IndexWriter writer, Analyzer analyzer) : base(analyzer) { if (writer == null) throw new ArgumentNullException("writer"); _disposer = new DisposableSearcher(this); _nrtWriter = writer; }
public LuceneSearcher(Lucene.Net.Store.Directory luceneDirectory, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); LuceneIndexFolder = null; _luceneDirectory = luceneDirectory; }
public LuceneSearcher(DirectoryInfo workingFolder, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); LuceneIndexFolder = new DirectoryInfo(Path.Combine(workingFolder.FullName, "Index")); InitializeDirectory(); }
public LuceneSearcher(DirectoryInfo workingFolder, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); _reopener = new ReaderReopener(this); LuceneIndexFolder = new DirectoryInfo(Path.Combine(workingFolder.FullName, "Index")); InitializeDirectory(); }
/// <summary> /// Constructor to allow creating an indexer at runtime with the specified lucene directory /// </summary> /// <param name="name"></param> /// <param name="luceneDirectory"></param> /// <param name="analyzer"></param> /// <param name="fieldValueTypeCollection"></param> public LuceneSearcher(string name, Directory luceneDirectory, Analyzer analyzer, FieldValueTypeCollection fieldValueTypeCollection) : base(name, analyzer) { _disposer = new DisposableSearcher(this); _reopener = new ReaderReopener(this); _directory = luceneDirectory; FieldValueTypeCollection = fieldValueTypeCollection; }
public LuceneSearcher(Lucene.Net.Store.Directory luceneDirectory, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); LuceneIndexFolder = null; _directoryExplicit = luceneDirectory; _directoryLazy = new Lazy <Directory>(InitializeDirectory); }
public LuceneSearcher(DirectoryInfo workingFolder, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); LuceneIndexFolder = new DirectoryInfo(Path.Combine(workingFolder.FullName, "Index")); _directoryLazy = new Lazy <Directory>(InitializeDirectory); _directoryLazy = new Lazy <Directory>(InitializeDirectory); }
/// <summary> /// Constructor allowing for creating a NRT instance based on a given writer /// </summary> /// <param name="name"></param> /// <param name="writer"></param> /// <param name="analyzer"></param> /// <param name="fieldValueTypeCollection"></param> public LuceneSearcher(string name, IndexWriter writer, Analyzer analyzer, FieldValueTypeCollection fieldValueTypeCollection) : base(name, analyzer) { _disposer = new DisposableSearcher(this); _reopener = new ReaderReopener(this); _nrtWriter = writer ?? throw new ArgumentNullException(nameof(writer)); FieldValueTypeCollection = fieldValueTypeCollection; }
public LuceneSearcher(IndexWriter writer, Analyzer analyzer) : base(analyzer) { if (writer == null) { throw new ArgumentNullException("writer"); } _disposer = new DisposableSearcher(this); _nrtWriter = writer; }
public MultiIndexSearcher(IEnumerable<DirectoryInfo> indexPath, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); var searchers = new List<LuceneSearcher>(); //NOTE: DO NOT convert to Linq like this used to be as this breaks security level 2 code because of something Linq is doing. foreach (var ip in indexPath) { searchers.Add(new LuceneSearcher(ip, IndexingAnalyzer)); } Searchers = searchers; }
public MultiIndexSearcher(IEnumerable<Lucene.Net.Store.Directory> luceneDirs, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); var searchers = new List<LuceneSearcher>(); //NOTE: DO NOT convert to Linq like this used to be as this breaks security level 2 code because of something Linq is doing. foreach (var luceneDirectory in luceneDirs) { searchers.Add(new LuceneSearcher(luceneDirectory, IndexingAnalyzer)); } Searchers = searchers; }
public MultiIndexSearcher(IEnumerable <Lucene.Net.Store.Directory> luceneDirs, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); var searchers = new List <LuceneSearcher>(); //NOTE: DO NOT convert to Linq like this used to be as this breaks security level 2 code because of something Linq is doing. foreach (var luceneDirectory in luceneDirs) { searchers.Add(new LuceneSearcher(luceneDirectory, IndexingAnalyzer)); } Searchers = searchers; }
public MultiIndexSearcher(IEnumerable <DirectoryInfo> indexPath, Analyzer analyzer) : base(analyzer) { _disposer = new DisposableSearcher(this); var searchers = new List <LuceneSearcher>(); //NOTE: DO NOT convert to Linq like this used to be as this breaks security level 2 code because of something Linq is doing. foreach (var ip in indexPath) { searchers.Add(new LuceneSearcher(ip, IndexingAnalyzer)); } Searchers = searchers; }
/// <summary> /// Default constructor /// </summary> public MultiIndexSearcher() { _disposer = new DisposableSearcher(this); }
public LuceneSearcher() { _disposer = new DisposableSearcher(this); _directoryLazy = new Lazy <Directory>(InitializeDirectory); }
/// <summary> /// Constructor to allow for creating a searcher at runtime /// </summary> /// <param name="name"></param> /// <param name="searchers"></param> /// <param name="analyzer"></param> public MultiIndexSearcher(string name, Lazy <IEnumerable <ISearcher> > searchers, Analyzer analyzer = null) : base(name, analyzer ?? new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30)) { _searchers = searchers; _disposer = new DisposableSearcher(this); }
/// <summary> /// Constructor to allow for creating a searcher at runtime /// </summary> /// <param name="name"></param> /// <param name="indexes"></param> /// <param name="analyzer"></param> public MultiIndexSearcher(string name, IEnumerable <IIndex> indexes, Analyzer analyzer = null) : base(name, analyzer ?? new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30)) { _searchers = new Lazy <IEnumerable <ISearcher> >(() => indexes.Select(x => x.GetSearcher())); _disposer = new DisposableSearcher(this); }
public LuceneSearcher() { _disposer = new DisposableSearcher(this); _reopener = new ReaderReopener(this); }
/// <summary> /// Default constructor /// </summary> public LuceneSearcher() { _disposer = new DisposableSearcher(this); }