19 using System.Collections.Generic;
23 using Lucene.Net.Analysis;
24 using Lucene.Net.Documents;
25 using Lucene.Net.Analysis.Standard;
26 using Lucene.Net.Index;
27 using Lucene.Net.Search;
28 using Lucene.Net.QueryParsers;
29 using Lucene.Net.Store;
30 using Lucene.Net.Util;
32 namespace Lucene.Net.Search
36 public class HitsPerFacet : IEnumerable<Document>, IEnumerator<Document>
40 int _ItemsReturned = 0;
52 this._FacetName = facetName;
53 this._Reader = reader;
54 this._MaxDocPerFacet = maxDocPerFacet;
55 this._QueryDocidSet = queryDocidSet;
56 this._GroupBitSet = groupBitSet;
60 internal void Calculate()
69 _ResultBitSet.And(_GroupBitSet);
72 _ResultIterator = _ResultBitSet.Iterator();
74 _HitCount = _ResultBitSet.Cardinality();
77 _QueryDocidSet = null;
83 get {
return _FacetName; }
88 get{
return _HitCount; }
93 get {
return _Reader.
Document(_CurrentDocId); }
96 object System.Collections.IEnumerator.Current
98 get {
return _Reader.Document(_CurrentDocId); }
101 public bool MoveNext()
103 _CurrentDocId = _ResultIterator.NextDoc();
107 public IEnumerator<Document> GetEnumerator()
112 System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
119 throw new NotImplementedException();
122 public void Dispose()