2009/8/8 Jón Helgi Jónsson <jonjons...@gmail.com>:
> Thanks for that. So perhaps use copyfield in schema and make a subcat
> field identical to my category would be the best solution?

That's certainly an undesirable side effect of our current syntax -
I'll open a JIRA issue to address this, but it's probably not
something that can make it in time for 1.4

You could sort-of get what you want by using the multi-select faceting
support to exclude tagged filters... but that effects the main doc
list (that may or may not matter for your usecase).

q=foo
&fq={!tag=f0}category:00
&fq={!tag=f1}category:01
&facet=true
&facet.field={!key=cat00 ex=f1}category
&facet.field={!key=cat01 ex=f0}category

-Yonik
http://www.lucidimagination.com



> On Sat, Aug 8, 2009 at 10:17 AM, Koji Sekiguchi<k...@r.email.ne.jp> wrote:
>> Jón Helgi Jónsson wrote:
>>>
>>> I'm trying to facet multiple times on same field using key.
>>>
>>> This works fine except when I use prefixes for these facets.
>>>
>>> What I got so far (and not functional):
>>> ..
>>> &facet=true
>>> &facet.field=category&f.category.facet.prefix=01
>>> &facet.field={!key=subcat}category&f.subcat.facet.prefix=00
>>>
>>> This will give me 2 facets in results, one named 'category' and
>>> another 'subcat' like expected. But prefix for key 'subcat' is ignored
>>> and the other prefix is used for both facets.
>>>
>>> How do I use key with prefixes or am I barking up the wrong tree here?
>>>
>>> Thanks!
>>>
>>>
>>
>> I think '!key' can be used for just a label when displaying
>> the facet result. As it doesn't change its field name,
>> the parameter f.subcat.facet.prefix=00 is ignored.

Reply via email to