Example #1
0
 private static void PushTermOnStack(string term, TermIndexAccessor index, Stack opStack)
 {
     if (!FullTextIndexer.isValuableToken(term))
     {
         opStack.Push(new StopwordTerm());
         if (Stopwords.IndexOf(term) == -1)
         {
             Stopwords.Add(term);
         }
     }
     else
     {
         TermIndexRecord record = index.GetRecord(term);
         if (record != null)
         {
             int order = Lexemes.IndexOf(term);
             if (order == -1)
             {
                 Lexemes.Add(term);
                 order = Lexemes.Count - 1;
             }
             record.PopulateRecordID((ushort)order);
         }
         opStack.Push(record);
     }
 }