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 Venu Mittal <me...@yahoo.com> on 2009/03/01 03:03:19 UTC

Re: SOLR newbie question: How to filter the results based on my Unique Key

Hi Stephen,

Thanks for the info. 

I took the latest patch (collapsing-patch-to-1.3.0-dieter.patch) and applied it on the source code. Then I took the newly created jar added it to SOLR war. But SOLR is still ignoring the new config. I am still getting 2 records in my resultset. Is there something that I am missing here ?

TIA.


________________________________
From: Stephen Weiss <sw...@stylesight.com>
To: solr-user@lucene.apache.org
Sent: Saturday, February 28, 2009 10:50:26 PM
Subject: Re: SOLR newbie question: How to filter the results based on my Unique Key

There's an experimental patch for this I've had pretty good success with:

https://issues.apache.org/jira/browse/SOLR-236

If you don't particularly need faceting support to work 100% it's already pretty perfect.  Officially I guess they want it to make it in for version 1.5??  But in the meantime it's pretty easy to implement and stable, just make sure you use the latest patch.

--
Steve

On Feb 28, 2009, at 5:45 PM, Venu Mittal wrote:

> Hi List,
> 
> Is it possible to filter out the duplicate results using a particular field in the document.
> e.g.
> 
> <doc>
> <field name="cust_id>123</field>
> <field name="unique_id>1</field>
> <field name="email>a@b.com</field>
> </doc>
> <doc>
> <field name="cust_id>123</field>
> <field name="unique_id>2</field>
> <field name="email>a@b.com</field>
> </doc>
> 
> Now if I search for email = a@b.com I get 2 search results but I want to send just one record cause my cust_id is same. Is it possible or do I need to handle it in the calling application.
> 
> Thanks
> 
> 


      

Re: SOLR newbie question: How to filter the results based on my Unique Key

Posted by Venu Mittal <me...@yahoo.com>.
Ok so I tried out XSLT transformation on the resulting xml and I must say that I am very impressed with the results. I will do some more load testing tomorrow and finalize this solution.

Thanks everyone.




________________________________
From: Venu Mittal <me...@yahoo.com>
To: solr-user@lucene.apache.org
Sent: Sunday, March 1, 2009 2:03:19 AM
Subject: Re: SOLR newbie question: How to filter the results based on my Unique Key

Hi Stephen,

Thanks for the info. 

I took the latest patch (collapsing-patch-to-1.3.0-dieter.patch) and applied it on the source code. Then I took the newly created jar added it to SOLR war. But SOLR is still ignoring the new config. I am still getting 2 records in my resultset. Is there something that I am missing here ?

TIA.


________________________________
From: Stephen Weiss <sw...@stylesight.com>
To: solr-user@lucene.apache.org
Sent: Saturday, February 28, 2009 10:50:26 PM
Subject: Re: SOLR newbie question: How to filter the results based on my Unique Key

There's an experimental patch for this I've had pretty good success with:

https://issues.apache.org/jira/browse/SOLR-236

If you don't particularly need faceting support to work 100% it's already pretty perfect.  Officially I guess they want it to make it in for version 1.5??  But in the meantime it's pretty easy to implement and stable, just make sure you use the latest patch.

--
Steve

On Feb 28, 2009, at 5:45 PM, Venu Mittal wrote:

> Hi List,
> 
> Is it possible to filter out the duplicate results using a particular field in the document.
> e.g.
> 
> <doc>
> <field name="cust_id>123</field>
> <field name="unique_id>1</field>
> <field name="email>a@b.com</field>
> </doc>
> <doc>
> <field name="cust_id>123</field>
> <field name="unique_id>2</field>
> <field name="email>a@b.com</field>
> </doc>
> 
> Now if I search for email = a@b.com I get 2 search results but I want to send just one record cause my cust_id is same. Is it possible or do I need to handle it in the calling application.
> 
> Thanks
> 
>