Exemple #1
0
        internal void Update(UnsortedBufferedDeletes @in)
        {
            numTerms  += @in.numTerms;
            bytesUsed += @in.bytesUsed;

            if (numTerms != 0)
            {
                // Grow the list if necessary.
                if (terms.Capacity < numTerms)
                {
                    terms.Capacity = numTerms;
                }

                foreach (var term in @in.terms)
                {
                    terms.Add(new DeleteTerm(term.Key, term.Value));
                }

                terms.Sort(ref sorter);
            }

            foreach (var term in @in.queries)
            {
                queries[term.Key] = term.Value;
            }

            docIDs.AddRange(@in.docIDs);
            @in.Clear();
        }
Exemple #2
0
        internal void Update(UnsortedBufferedDeletes @in)
        {
            numTerms  += @in.numTerms;
            bytesUsed += @in.bytesUsed;
            foreach (var term in @in.terms)
            {
                terms[term.Key] = term.Value;
            }
            foreach (var term in @in.queries)
            {
                queries[term.Key] = term.Value;
            }

            docIDs.AddRange(@in.docIDs);
            @in.Clear();
        }