You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter Ledbrook <pe...@cacoethes.co.uk> on 2009/09/25 12:15:42 UTC

Using two Solr documents to represent one logical document/file

Hi,

I want to index both the contents of a document/file and metadata associated
with that document. Since I also want to update the content and metadata
indexes independently, I believe that I need to use two separate Solr
documents per real/logical document. The question I have is how do I merge
query results so that only one result is returned per real/logical document,
not per Solr document? In particular, I don't want to filter the results to
satisfy any "max results" constraint.

I have read that this can be achieved with a facet search. Is this the best
approach, or is there some alternative?

Thanks,

Peter
-- 
View this message in context: http://www.nabble.com/Using-two-Solr-documents-to-represent-one-logical-document-file-tp25609646p25609646.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using two Solr documents to represent one logical document/file

Posted by Peter Ledbrook <pe...@cacoethes.co.uk>.

Matt Weber-2 wrote:
> 
> Check out the field collapsing patch:
> 
> http://wiki.apache.org/solr/FieldCollapsing
> https://issues.apache.org/jira/browse/SOLR-236
> 

That looks like just the ticket. Thanks for the quick response.

Peter
-- 
View this message in context: http://www.nabble.com/Using-two-Solr-documents-to-represent-one-logical-document-file-tp25609646p25641369.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using two Solr documents to represent one logical document/file

Posted by Matt Weber <ma...@mattweber.org>.
Check out the field collapsing patch:

http://wiki.apache.org/solr/FieldCollapsing
https://issues.apache.org/jira/browse/SOLR-236

Thanks,

Matt Weber

On Sep 25, 2009, at 3:15 AM, Peter Ledbrook wrote:

>
> Hi,
>
> I want to index both the contents of a document/file and metadata  
> associated
> with that document. Since I also want to update the content and  
> metadata
> indexes independently, I believe that I need to use two separate Solr
> documents per real/logical document. The question I have is how do I  
> merge
> query results so that only one result is returned per real/logical  
> document,
> not per Solr document? In particular, I don't want to filter the  
> results to
> satisfy any "max results" constraint.
>
> I have read that this can be achieved with a facet search. Is this  
> the best
> approach, or is there some alternative?
>
> Thanks,
>
> Peter
> -- 
> View this message in context: http://www.nabble.com/Using-two-Solr-documents-to-represent-one-logical-document-file-tp25609646p25609646.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>