Beispiel #1
0
 internal RocksDbDocsIdSetEnumerator(RocksDbStorage storage, int termId, int?propertyId)
 {
     Storage          = storage;
     TermId           = termId;
     PropertyId       = propertyId;
     RocksDbIterator  = storage.Database.NewIterator();
     RocksIteratorKey = Array.Empty <byte>();
     Prefix           = RocksDbEncoder.EncodeInvertedIndexPostingPrefix(termId, propertyId);
     // Todo: Create encoder instead of slicing or create a special method
     Cost = propertyId != null
         ? (long)Storage.GetCounterValue(RocksDbStorage.Counter.TermFrequencyByTermAndProperty, Prefix.AsSpan().Slice(1))
         : (long)Storage.GetCounterValue(RocksDbStorage.Counter.TermFrequencyByTerm, Prefix.AsSpan().Slice(1));
 }
Beispiel #2
0
 internal RocksDbTermsEnumerator(RocksDbStorage storage)
 {
     Storage          = storage;
     RocksDbIterator  = storage.Database.NewIterator();
     RocksIteratorKey = Array.Empty <byte>();
 }
Beispiel #3
0
 public RocksDbAliasStore(RocksDbStorage storage)
 {
     Storage = storage;
 }