void HowToUse(string searchString)
{
Query query = new QueryParser(Lucene.Net.Util.Version.LUCENE_29, "text", new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29)).Parse(searchString);
var sfs = new SparseFacetedSearcher(_Reader, "lang", "source", "category");
var hits = sfs.Search(query);
long totalHits = hits.TotalHitCount;
foreach (var hpg in hits.Facets)
{
long hitCountPerGroup = hpg.Count;
var facetName = hpg.Name;
for (int i = 0; i < facetName.Length; i++)
{
string part = facetName[i];
}
foreach (Document doc in hpg.Documents)
{
string text = doc.GetField("text").StringValue();
System.Diagnostics.Debug.WriteLine(">>" + facetName + ": " + text);
}
}
}