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 Rafal Bluszcz Zawadzki <ra...@headnet.dk> on 2010/07/28 14:09:59 UTC
Get unique values
Hi,
In my schema I have (inter ali) fields CollectionID, and CollectionName.
These two values always match together, which means that for every value of
CollectionID there is matching value from CollectionName.
I am interested in query which allow me to get unique values of CollectionID
with matching CollectionNames (rest of fields is not interested for me in
this query).
I was thinking about facets, but they offer a bit more than I need.
Anyone has idea for query which allow me to get these results?
Cheers,
--
Rafał Zawadzki
http://dev.bluszcz.net
Re: Get unique values
Posted by Rafal Bluszcz Zawadzki <ra...@headnet.dk>.
2010/7/28 Rafal Bluszcz Zawadzki <ra...@headnet.dk>
> Hi,
>
> In my schema I have (inter ali) fields CollectionID, and CollectionName.
> These two values always match together, which means that for every value of
> CollectionID there is matching value from CollectionName.
>
> I am interested in query which allow me to get unique values of
> CollectionID with matching CollectionNames (rest of fields is not interested
> for me in this query).
>
>
Finally I decided to store values in one indexed field (Collections) and
below query did the trick:
q=*:*&rows=0&facet=on&facet.field=Collections
--
Rafał Zawadzki
http://dev.bluszcz.net/