Пример #1
0
 public static void initializeSuggestor()
 {
     luceneSearch = new LuceneSearch("lucene_index");
     _isIndexing  = false;
     _isUpdating  = false;
     _stopNow     = false;
 }
Пример #2
0
        /// <summary>
        /// If a word achieved a predefined maximum weight, normalizes all the words' weights
        /// </summary>
        /// <param name="words"></param>
        private static void Normalize(IEnumerable <DataType> words)
        {
            LuceneSearch temporarySearch = new LuceneSearch();

            foreach (DataType data in words)
            {
                data.Weight /= 2;
                temporarySearch.AddLuceneIndex(data);
            }
            luceneSearch.changeDirectory(temporarySearch.CurrentDirectory);
            _isNormalizing = false;
        }
Пример #3
0
 public static void initializeSuggester()
 {
     luceneSearch = new LuceneSearch("lucene_index");
 }