lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rihaed Tan <>
Subject Re: Return 2 fields per facet.. name and id, for example? / facet value search
Date Thu, 27 Aug 2009 19:27:55 GMT

I have a similar requirement to Matthew (from his post 2 years ago). Is this
still the way to go in storing both the ID and name/value for facet values?
I'm planning to use id#name format if this is still the case and doing a
prefix query. I believe this is a common requirement so I'd appreciate if
any of you guys can share what's the best way to do it.

Also, I'm indexing the facet values for text search as well. Should the
field declaration below suffice the requirement?

<field name="category" type="text" indexed="true" stored="true"
required="true" multiValued="true"/>


> Re: Return 2 fields per facet.. name and id, for example?

> Matthew Runo

Fri, 07 Sep 2007 13:15:12 -0700

> Ahh... sneaky. I'll probably do the combined-name#id method.

> +--------------------------------------------------------+

| Matthew Runo

| Zappos Development


| 702-943-7833


> On Sep 7, 2007, at 12:38 PM, Yonik Seeley wrote:

>    On 9/7/07, Matthew Runo <[EMAIL PROTECTED]> 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>

>    -Yonik

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message