You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by abhayd <aj...@hotmail.com> on 2012/02/16 06:49:23 UTC
feeding mahout cluster output back to solr
hi
at present we use carrot2 for clustering and doing analysis on customer
feedback data. Since its in memory and search time we are having issues with
performance and cluster size.
I was reading about generating clusters using mahout from solr index data.
Which I tried and it works.
But can we feed cluster label generated by mahout and original
title/comments back into another solr core to use cluster labels as facets?
the file i have is like this
docid,text
I m looking at this
http://java.dzone.com/videos/configuring-mahout-clustering
and seems like when u generate cluster u maintain docid in cluster. like
clusterid,docid and map it with original document content.
I am unable to understand how docid will be part of cluster. Anyway to get
more details / steps how i can get docid in cluster?
--
View this message in context: http://lucene.472066.n3.nabble.com/feeding-mahout-cluster-output-back-to-solr-tp3749280p3749280.html
Sent from the Mahout User List mailing list archive at Nabble.com.
Re: feeding mahout cluster output back to solr
Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
> at present we use carrot2 for clustering and doing analysis on customer
> feedback data. Since its in memory and search time we are having issues with
> performance and cluster size.
Carrot2 algorithms haven't been designed for large volumes of
documents (but rather for speedy processing of what can fit in
memory). Mahout is a good pick if you need full index clustering; we
can suggest tuning options for Carrot2 that will make processing of
larger(ish) data sets feasible but it will never scale to the sizes
Mahout can handle.
Dawid
Re: feeding mahout cluster output back to solr
Posted by Selvam S <se...@knackforge.com>.
Hi,
On Thu, Feb 16, 2012 at 11:19 AM, abhayd <aj...@hotmail.com> wrote:
> hi
> at present we use carrot2 for clustering and doing analysis on customer
> feedback data. Since its in memory and search time we are having issues
> with
> performance and cluster size.
>
> I was reading about generating clusters using mahout from solr index data.
> Which I tried and it works.
>
> But can we feed cluster label generated by mahout and original
> title/comments back into another solr core to use cluster labels as facets?
>
> the file i have is like this
> docid,text
>
> I m looking at this
> http://java.dzone.com/videos/configuring-mahout-clustering
>
> and seems like when u generate cluster u maintain docid in cluster. like
> clusterid,docid and map it with original document content.
>
> I am unable to understand how docid will be part of cluster. Anyway to get
> more details / steps how i can get docid in cluster?
>
Use -cl option when clustering.
Then you can write a custom code something like this to read the doc_id and
cluster name.
SequenceFile.Reader reader = new SequenceFile.Reader(fs, new
Path(file.getAbsolutePath()), conf);
IntWritable key = new IntWritable();
WeightedVectorWritable value = new WeightedVectorWritable();
while (reader.next(key, value)) {
NamedVector vector = (NamedVector)
value.getVector();
String vectorName = vector.getName();
System.out.println(vectorName + " belongs to
cluster "+key.toString());
}
Then you can use CommonsHttpSolrServer, to post the details back to Solr.
CommonsHttpSolrServer server = new CommonsHttpSolrServer("
http://localhost:8983/solr/core0");
.
.
I hope it helps you.
--
Regards,
Selvam
http://knackforge.com