internal void UpdateBottom(int doc, float score)
 {
     bottom.Doc = docBase + doc;
     bottom.Score = score;
     bottom = hitQueue.UpdateTop();
 }
        public virtual BrowseHit[] BuildHits(FieldDocEntry[] fdocs)
        {
            BrowseHit[] hits = new BrowseHit[fdocs.Length];
            int i = 0;

            ICollection<FacetHandler> facetHandlers = reader.GetFacetHandlerMap().Values;
            foreach (FieldDocEntry fdoc in fdocs)
            {
                BrowseHit hit = new BrowseHit();
                if (fetchStoredFields)
                {
                    hit.StoredFields = reader.Document(fdoc.Doc);
                }
                Dictionary<string, string[]> map = new Dictionary<string, string[]>();
                foreach (FacetHandler facetHandler in facetHandlers)
                {
                    map.Add(facetHandler.Name, facetHandler.GetFieldValues(fdoc.Doc));
                }
                hit.FieldValues = map;
                hit.DocId = fdoc.Doc;
                hit.Score = fdoc.Score;
                foreach (SortField f in sortFields)
                {
                    if (f.Type != SortField.SCORE && f.Type != SortField.DOC)
                    {
                        string fieldName = f.Field;
                        FieldComparator comparator;
                        hitQueue.comparatorMap.TryGetValue(fieldName, out comparator);
                        if (comparator != null)
                        {
                            hit.AddComparable(fieldName, comparator[fdoc.Slot]);
                        }
                    }
                }
                hits[i++] = hit;
            }
            FillInRuntimeFacetValues(hits);
            return hits;
        }
 internal void Add(int slot, int doc, float score)
 {
     bottom = hitQueue.Add(new FieldDocEntry(slot, doc, score));
     queueFull = totalHits == numHits;
 }