コード例 #1
0
 public LuceneSearcher(IndexWriter writer, Analyzer analyzer)
     : base(analyzer)
 {
     if (writer == null) throw new ArgumentNullException("writer");
     _disposer = new DisposableSearcher(this);
     _nrtWriter = writer;
 }
コード例 #2
0
 public LuceneSearcher(Lucene.Net.Store.Directory luceneDirectory, Analyzer analyzer)
     : base(analyzer)
 {
     _disposer         = new DisposableSearcher(this);
     LuceneIndexFolder = null;
     _luceneDirectory  = luceneDirectory;
 }
コード例 #3
0
ファイル: LuceneSearcher.cs プロジェクト: jclementson/Examine
 public LuceneSearcher(DirectoryInfo workingFolder, Analyzer analyzer)
     : base(analyzer)
 {
     _disposer = new DisposableSearcher(this);
     LuceneIndexFolder = new DirectoryInfo(Path.Combine(workingFolder.FullName, "Index"));
     InitializeDirectory();
 }
コード例 #4
0
ファイル: LuceneSearcher.cs プロジェクト: bowserm/Examine
 public LuceneSearcher(Lucene.Net.Store.Directory luceneDirectory, Analyzer analyzer)
     : base(analyzer)
 {
     _disposer = new DisposableSearcher(this);
     LuceneIndexFolder = null;
     _luceneDirectory = luceneDirectory;
 }
コード例 #5
0
 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();
 }
コード例 #6
0
 /// <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;
 }
コード例 #7
0
ファイル: LuceneSearcher.cs プロジェクト: lars-erik/Examine
 public LuceneSearcher(Lucene.Net.Store.Directory luceneDirectory, Analyzer analyzer)
     : base(analyzer)
 {
     _disposer          = new DisposableSearcher(this);
     LuceneIndexFolder  = null;
     _directoryExplicit = luceneDirectory;
     _directoryLazy     = new Lazy <Directory>(InitializeDirectory);
 }
コード例 #8
0
ファイル: LuceneSearcher.cs プロジェクト: lars-erik/Examine
 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);
 }
コード例 #9
0
 /// <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;
 }
コード例 #10
0
ファイル: LuceneSearcher.cs プロジェクト: lars-erik/Examine
 public LuceneSearcher(IndexWriter writer, Analyzer analyzer)
     : base(analyzer)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     _disposer  = new DisposableSearcher(this);
     _nrtWriter = writer;
 }
コード例 #11
0
ファイル: MultiIndexSearcher.cs プロジェクト: Xamarui/Examine
		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;
        }
コード例 #12
0
ファイル: MultiIndexSearcher.cs プロジェクト: Xamarui/Examine
		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;
		}
コード例 #13
0
        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;
        }
コード例 #14
0
        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;
        }
コード例 #15
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public MultiIndexSearcher()
 {
     _disposer = new DisposableSearcher(this);
 }
コード例 #16
0
ファイル: LuceneSearcher.cs プロジェクト: lars-erik/Examine
 public LuceneSearcher()
 {
     _disposer      = new DisposableSearcher(this);
     _directoryLazy = new Lazy <Directory>(InitializeDirectory);
 }
コード例 #17
0
 /// <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);
 }
コード例 #18
0
 /// <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);
 }
コード例 #19
0
 public LuceneSearcher()
 {
     _disposer = new DisposableSearcher(this);
     _reopener = new ReaderReopener(this);
 }
コード例 #20
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public LuceneSearcher()
 {
     _disposer = new DisposableSearcher(this);
 }
コード例 #21
0
ファイル: MultiIndexSearcher.cs プロジェクト: Xamarui/Examine
		/// <summary>
		/// Default constructor
		/// </summary>
        public MultiIndexSearcher()
		{
            _disposer = new DisposableSearcher(this);
        }
コード例 #22
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public LuceneSearcher()
 {
     _disposer = new DisposableSearcher(this);
 }