Inheritance: IDisposable
Esempio n. 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>();
        }
Esempio n. 2
0
 public IndexSearcherToken(IndexSearcher searcher, SearcherManager manager)
 {
     _manager = manager;
     Searcher = searcher;
 }
Esempio n. 3
0
 public SearcherManagerRef(bool applyDeletes, long generation, SearcherManager manager)
 {
     ApplyDeletes = applyDeletes;
     Generation   = generation;
     Manager      = manager;
 }
Esempio n. 4
0
 public IndexSearcherToken(IndexSearcher searcher, SearcherManager manager)
 {
     _manager = manager;
     Searcher = searcher;
 }
Esempio n. 5
0
 public SearcherManagerRef(bool applyDeletes, long generation, SearcherManager manager)
 {
     ApplyDeletes = applyDeletes;
     Generation = generation;
     Manager = manager;
 }