public virtual void AddFacetCount(BytesRef facetValue, int count) { if (count < currentMin) { return; } FacetEntry facetEntry = new FacetEntry(facetValue, count); if (facetEntries.Count == maxSize) { FacetEntry temp; if (!facetEntries.TrySuccessor(facetEntry, out temp)) { return; } facetEntries.DeleteMax(); } facetEntries.Add(facetEntry); if (facetEntries.Count == maxSize) { currentMin = facetEntries.FindMax().Count; } }