Inheritance: IDisposable
コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FullTextIndex" /> class.
        /// </summary>
        /// <param name="enableStemming">if set to <c>true</c>, the FullTextIndex will stem 
        /// the tokens that make up the texts, using the Porter stemming algorithm.</param>
        /// <param name="ignoreCase">if set to <c>true</c>, character casing is ignored.</param>
        /// <param name="separatorChars">A string whose component characters will be used to split the texts into tokens.</param>
        public FullTextIndex(bool enableStemming = true, bool ignoreCase = true, string separatorChars = CustomTokenizer.DEFAULT_SEPARATOR_CHARS)
        {
            _directory = new RAMDirectory();
            _analyzer = new CustomAnalyzer(enableStemming, ignoreCase, separatorChars);

            _writer = new IndexWriter(_directory, _analyzer, IndexWriter.MaxFieldLength.UNLIMITED);
            _searcherManager = new SearcherManager(_writer);

            _queryCache = new ConcurrentDictionary<string, Query>();
        }
コード例 #2
0
 public IndexSearcherToken(IndexSearcher searcher, SearcherManager manager)
 {
     _manager = manager;
     Searcher = searcher;
 }
コード例 #3
0
ファイル: NrtManager.cs プロジェクト: mynkow/NrtManager
 public SearcherManagerRef(bool applyDeletes, long generation, SearcherManager manager)
 {
     ApplyDeletes = applyDeletes;
     Generation   = generation;
     Manager      = manager;
 }
コード例 #4
0
ファイル: SearcherManager.cs プロジェクト: mynkow/NrtManager
 public IndexSearcherToken(IndexSearcher searcher, SearcherManager manager)
 {
     _manager = manager;
     Searcher = searcher;
 }
コード例 #5
0
ファイル: NrtManager.cs プロジェクト: mynkow/NrtManager
 public SearcherManagerRef(bool applyDeletes, long generation, SearcherManager manager)
 {
     ApplyDeletes = applyDeletes;
     Generation = generation;
     Manager = manager;
 }