I have the following in schema.xml
    <fieldType name="cq_tag" class="solr.TextField"
positionIncrementGap="100">
        <analyzer type="index">
            <tokenizer class="solr.PathHierarchyTokenizerFactory"
delimiter="$"/>
        </analyzer>
        <analyzer type="query">
            <tokenizer class="solr.KeywordTokenizerFactory"/>
        </analyzer>
    </fieldType>
    <field name="colors"             type="cq_tag"      indexed="true"
stored="true" multiValued="true"/>


And, I have the following doc:
<doc>
    <arr name="colors">
        <str>blues$Teal/Turquoise</str>
    </arr>
    ...
</doc>


Response of the query:
http://localhost:8983/solr/select/?q=*:*&facet=true&facet.field=colors&rows=100
is

<lst name="facet_counts">
    <lst name="facet_queries"/>
    <lst name="facet_fields">
        <lst name="colors">
              <int name="blues">1</int>
              <int name="blues$Teal/Turquoise">1</int>
         </lst>
    </lst>
    <lst name="facet_dates"/>
    <lst name="facet_ranges"/>
</lst>



During index,  blues$Teal/Turquoise  is tokenized into:
blues
blues$Teal/Turquoise

I think that's why facet count includes both blues and blues$Teal/Turquoise.

Can I have facet count only include the whole keyword,
blues$Teal/Turquoise,  not blues?

Reply via email to