How to realize solr automatic clustering
This article mainly explains the "solr automatic clustering how to achieve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "solr automatic clustering how to achieve" it!
Solr uses Carrot2 to complete the clustering function, which can automatically classify the retrieved content. Carrot2 clustering example:
For Solr to support clustering, it is preferred to copy the dist/ solr-clustering-4.2.0.jar in the Solr distribution to\ solr\ contrib\ analysis-extras\ lib. Then open solrconfig.xml to add configuration:
Default
Org.carrot2.clustering.lingo.LingoClusteringAlgorithm
thirty
0.70
0
Org.carrot2.clustering.lingo.SimpleLabelAssigner
1.5
eight
eight
HIGH
Org.carrot2.matrix.factorization.NonnegativeMatrixFactorizationEDFactory
37500
2.0
0.9
Org.carrot2.text.vsm.TfTermWeighting
CHINESE_SIMPLIFIED
Org.carrot2.text.clustering.MultilingualClustering.LanguageAggregationStrategy.FLATTEN_MAJOR_LANGUAGE
True
True
True
True
True
True
True
0.65
False
two
True
one
one
Clustering/carrot2
Id
After the clustering component is configured, configure requestHandler as follows:
Explicit
True
Default
True
Category_s
Content
Path
True
Clustering
There are two parameters to note that carrot.title,carrot.snippet is the comparative calculation field of clustering, these two parameters must be stored= "true" .carrot.title is more important than carrot.snippet, if there is only one calculated field carrot.snippet can be removed (is removed, not empty). After setting it up, you can use the following URL to query it.
Http://localhost:8080/skyCore/clustering?q=*%3A*&wt=xml&indent=true
Thank you for your reading, the above is the content of "how to achieve solr automatic clustering", after the study of this article, I believe you have a deeper understanding of how to achieve solr automatic clustering, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!