public AddressPartReduction GetReduction(ParsedAddressPart part) { if (_reduction == null) { _reduction = new ReductionRamStorage(_indexDirectory); } return _reduction.Get(part.Level, part.Reduction); }
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); }