Solr.Net Cluster Query

63 views
Skip to first unread message

Angelo Strano

unread,
Oct 30, 2015, 7:08:37 AM10/30/15
to SolrNet
Hi Mauricio,

I'm trying to look for clustering solr.net but can not understand which object to use.

Solr is working properly and provides the cluster results correctly.

I am using the following code:

ISolrOperations<T> solr = ServiceLocator.Current.GetInstance<ISolrOperations<T>>();

QueryOptions QueryOptions = new QueryOptions();
lusteringParameters cluParam = new ClusteringParameters();
cluParam.Algorithm = "org.carrot2.clustering.lingo.LingoClusteringAlgorithm";
cluParam.Engine = "Lingo";
cluParam.ProduceSummary = true;
cluParam.Snippet = "document_content_text";
cluParam.Results = true;
cluParam.Title = "name";
cluParam.Url = "id";
cluParam.LexicalResources = "clustering/carrot2";
cluParam.SubClusters = false;
cluParam.NumDescriptions = 5;

QueryOptions.Clustering = cluParam;

"omissis"

ClusterResults results = solr.Query(new SolrMultipleCriteriaQuery(Queries.ToArray(), Operator.ToString()), QueryOptions).Clusters;
 
Clusters property is always null.

Could you help me

Thank you

Mauricio Scheffer

unread,
Oct 30, 2015, 7:11:40 AM10/30/15
to sol...@googlegroups.com


--
Mauricio

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.

Angelo Strano

unread,
Oct 30, 2015, 12:59:32 PM10/30/15
to SolrNet
Ok Mauricio,

i try to enable clustering in /select block in solrconfig and add cluParam.Collection = true;

Now work fine!

Thank you
Reply all
Reply to author
Forward
0 new messages