Why not define the comment field as multiValued? That way you only index
each document once and you don't need to collapse anything...

Ephraim Ofir


-----Original Message-----
From: Sumit Arora [mailto:sumit1...@gmail.com] 
Sent: Thursday, August 26, 2010 12:54 PM
To: solr-user@lucene.apache.org
Subject: How to do ? Articles and Its Associated Comments Indexing , One
to Many relationship

I have set of Articles and then Comments on it, so in database I have
two
major tables one for Articles and one for Comments, but each Article
could
have many comments (One to Many).


If One Article will have 20 Comments, then on DB to SOLR - Index - Sync
:
Solr will index 20 Similar Documents with a difference of each Comment.


Use Case :

On Search: If keyword would be a fit to more than one comment, then it
will
return duplicate documents.


One Possible solution I thought to Apply:

******************************************

I should go for Indexing 20 Similar Documents with a difference of each
Comment.


While retrieving results from Query: I could use: collapse.field = By
Article Id


Am I following right approach?

Reply via email to