lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Return 2 fields per facet.. name and id, for example?
Date Fri, 07 Sep 2007 19:38:37 GMT
On 9/7/07, Matthew Runo <> wrote:
> I've found something which is either already in SOLR, or should be
> (as I can see it being very helpful). I couldn't figure out how to do
> it though..
> Lets say I'm trying to print out a page of products, and I want to
> provide a list of brands to filter by. It would be great if in my
> facets I could get this sort of xml...
> <int name="adidas" id="1">45</int>
> That way, I'd be able to know the brand id of adidas without having
> to run a second query somewhere for each facet to look it up.

If you can get the name from the id in your webapp, then index the id
to begin with (instead of the name).
<int name="1">45</int>

 Or, if you need both the name and the id, index them both together,
separated by a special character that you can strip out on the webapp

<int name="adidas#1">45</int>


View raw message