public void Add(DocumentPosting other) { if (other.DocumentId != DocumentId) { throw new ArgumentException("other"); } Count += other.Count; }
public DocumentPosting Join(DocumentPosting other) { if (other.DocumentId != DocumentId) { throw new ArgumentException(); } return(new DocumentPosting(DocumentId, Count + other.Count)); }
public void Add(string key, string value, DocumentPosting posting) { _timer.Start(); LcrsTrie trie; var hashedKey = key.ToHash(); if (!_tries.TryGetValue(hashedKey, out trie)) { trie = new LcrsTrie(); _tries.Add(hashedKey, trie); } trie.Add(value, 0, posting); }
public WordInfo(string field, string token, DocumentPosting posting) { Field = field; Token = token; Posting = posting; }