Exemplo n.º 1
0
 public AddressPartReduction GetReduction(ParsedAddressPart part)
 {
     if (_reduction == null)
     {
         _reduction = new ReductionRamStorage(_indexDirectory);
     }
     return _reduction.Get(part.Level, part.Reduction);
 }
Exemplo n.º 2
0
        public void Clear()
        {
            using (var fsDirectory = FSDirectory.Open(_indexDirectory))
            using (var writer = new IndexWriter(fsDirectory, _analyzer, true, IndexWriter.MaxFieldLength.LIMITED))
                writer.DeleteAll();

            _indexWrite = new IndexWriteRamStorage();
            _reduction = new ReductionRamStorage(_indexDirectory);
        }