예제 #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));
 }
예제 #2
0
 internal RocksDbTermsEnumerator(RocksDbStorage storage)
 {
     Storage          = storage;
     RocksDbIterator  = storage.Database.NewIterator();
     RocksIteratorKey = Array.Empty <byte>();
 }
예제 #3
0
 public RocksDbAliasStore(RocksDbStorage storage)
 {
     Storage = storage;
 }