The only way to do that is split your attributes, which are concatenations of attr and val. you should have color attr with vals red, green, blue; hdmi: yes/no; speaker: yes/no. 04.10.2012 5:19 пользователь "Aaron Bains" <aaronba...@gmail.com> написал:
> I am trying to set up my query for multi-select faceting, here is my > attempt at the query: > > > q=category:monitors&fq=attribute:(color-black)&facet.field=attribute&facet=true > > The undesired response from the query: > > <response> > <result name="response" numFound="1" start="0"> > <doc> > <str name="productid">1019141675</str> > </doc> > </result> > <lst name="facet_counts"> > <lst name="facet_queries"/> > <lst name="facet_fields"> > <lst name="attribute"> > <int name="color-black">1</int> > <int name="vga-yes">1</int> > <int name="hdmi-yes">1</int> > <int name="speakers-yes">1</int> > </lst> > </lst> > <lst name="facet_dates"/> > <lst name="facet_ranges"/> > </lst> > </response> > > > > > The desired response: > > <response> > <result name="response" numFound="1" start="0"> > <doc> > <str name="productid">1019141675</str> > </doc> > </result> > <lst name="facet_counts"> > <lst name="facet_queries"/> > <lst name="facet_fields"> > <lst name="attribute"> > <int name="color-black">120</int> > <int name="color-silver">58</int> > <int name="color-white">13</int> > <int name="vga-yes">1</int> > <int name="hdmi-yes">1</int> > <int name="speakers-yes">1</int> > </lst> > </lst> > <lst name="facet_dates"/> > <lst name="facet_ranges"/> > </lst> > </response> > > > The way I have the attribute and value delimited by a dash has me stumped > on how to perform the tagging and excluding. If we exclude the entire > attribute field with facet.field={!ex=dt}attribute it brings an undesired > result. What I need to do is exclude (attribute:color).... > > Thanks for the help!! >