lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [Lucene.Net] svn commit: r1127620 - /incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/contrib/SimpleFacetedSearch/README.txt
Date Wed, 25 May 2011 18:24:01 GMT
Author: digy
Date: Wed May 25 18:24:01 2011
New Revision: 1127620

URL: http://svn.apache.org/viewvc?rev=1127620&view=rev
Log:
[LUCENENET-415]

Added:
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/contrib/SimpleFacetedSearch/README.txt

Added: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/contrib/SimpleFacetedSearch/README.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/contrib/SimpleFacetedSearch/README.txt?rev=1127620&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/contrib/SimpleFacetedSearch/README.txt
(added)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/contrib/SimpleFacetedSearch/README.txt
Wed May 25 18:24:01 2011
@@ -0,0 +1,22 @@
+SimpleFacetedSearch: Dynamic clustering of search results into categories according to values
in given field(s).
+
+Sample Usage:
+
+    //Should be created only when IndexReader is opened/reopened. Creation with every search
can be performance killer
+    SimpleFacetedSearch sfs = new SimpleFacetedSearch(indexReader, new string[] { "source",
"category" });
+
+    Query query = new QueryParser(Lucene.Net.Util.Version.LUCENE_29, field, analyzer).Parse(searchString);
+    SimpleFacetedSearch.Hits hits = sfs.Search(query, 10);
+       
+    foreach (SimpleFacetedSearch.HitsPerGroup hpg in hits.HitsPerGroup)
+    {
+        SimpleFacetedSearch.GroupName name = hpg.Name;
+        foreach (Document doc in hpg.Documents)
+        {
+             ........
+        }
+    }
+
+
+
+PS: Hits.TotalHitCount & HitsPerGroup.HitCount properties are costly operations. Try
to avoid using them if possible.



Mime
View raw message