コード例 #1
0
        public void Add(DocumentPosting other)
        {
            if (other.DocumentId != DocumentId)
            {
                throw new ArgumentException("other");
            }

            Count += other.Count;
        }
コード例 #2
0
ファイル: DocumentPosting.cs プロジェクト: gbrian/resin
        public DocumentPosting Join(DocumentPosting other)
        {
            if (other.DocumentId != DocumentId)
            {
                throw new ArgumentException();
            }

            return(new DocumentPosting(DocumentId, Count + other.Count));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public WordInfo(string field, string token, DocumentPosting posting)
 {
     Field   = field;
     Token   = token;
     Posting = posting;
 }