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 Jörg Kiegeland <ki...@ikv.de> on 2007/11/12 19:14:05 UTC

DINSTINCT ON functionality in Solr?

Is there a way to define a query in that way that a search result 
contains only one representative of every set of documents which are 
equal on a given field (it is not important which representative 
document), i.e. to have the DINTINCT ON-concept from relational 
databases in Solr?

If this cannot be done with the search API of Lucene, may be one can use 
Solr server side hooks or filters to achieve this? How?

The reason why I do not want to do this filtering manually, is, because 
I want to have as many matches as possible with respect to my defined 
result limit for the query (and filtering the search result on client 
side may really kick me off from this limit far away).

Thanks..

Re: DINSTINCT ON functionality in Solr?

Posted by Pieter Berkel <pi...@gmail.com>.
Currently this functionality is not available in Solr out-of-the-box,
however there is a patch implementing Field Collapsing
http://issues.apache.org/jira/browse/SOLR-236 which might be similar to what
you are trying to achieve.

Piete



On 13/11/2007, Jörg Kiegeland <ki...@ikv.de> wrote:
>
> Is there a way to define a query in that way that a search result
> contains only one representative of every set of documents which are
> equal on a given field (it is not important which representative
> document), i.e. to have the DINTINCT ON-concept from relational
> databases in Solr?
>
> If this cannot be done with the search API of Lucene, may be one can use
> Solr server side hooks or filters to achieve this? How?
>
> The reason why I do not want to do this filtering manually, is, because
> I want to have as many matches as possible with respect to my defined
> result limit for the query (and filtering the search result on client
> side may really kick me off from this limit far away).
>
> Thanks..
>