Exemple #1
0
        public override void Process(ArchiverData t)
        {
            WFLogger.NLogger.Debug("Starting to process: " + t.DocumentToProcess);
            string     text   = File.ReadAllText(t.DocumentToProcess);
            List <Tag> fields = Flatten.Go(new Tag(text));

            SaveToLucene.Save(fields, t.ArchiveLocation);
        }
Exemple #2
0
        public static void Save(List <Tag> fields, string location)
        {
            DirectoryInfo dirInfo  = new DirectoryInfo(location);
            Directory     dir      = FSDirectory.Open(dirInfo);
            Analyzer      analyzer = new StandardAnalyzer(Version.LUCENE_30);

            using (IndexWriter writer = new IndexWriter(dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED))
            {
                SaveToLucene.SaveData(fields, writer);
            }
        }