When searching on faces, in the search element, the doc element has a field with values ββin the form of a string (more than words), but in the facet, each value has the form of a string with one word. Below is the search result for sample solr,
<result> <doc> <str name="fieldA">abc1 efg1 ijk1</str> <str name="fieldA">abc2 efg2 ijk2</str> <str name="fieldA">abc3 efg3 ijk3</str> <arr name="fieldD"> <str>abc1 efg1 ijk1</str> <str>abc2 efg2 ijk2</str> <str>abc3 efg3 ijk3</str> </arr> </doc> </result> <lst name="facet_counts"> <lst name="facet_queries"> <int name="fieldB:ab">some_number</int> </lst> <lst name="facet_fields"> <lst name="fieldA"> <int name="abc1">1</int> I want <int name="abc1 efg1 ijk1">1</int> <int name="efg1">1</int> <int name="ijk1">1</int> </lst> </lst> </lst>
Schema.xml has fields - fieldA, fieldB, fieldC and fieldD, as shown below
<field name="fieldA" type="text_general" stored="true" indexed="true"/> <field name="fieldB" type="text_general" stored="true" indexed="true"/> <field name="fieldC" type="text_general" stored="true" indexed="true"/> <field name="fieldD" type="text_general" stored="true" indexed="true"/>
and
<copyField source="fieldA" dest="fieldD"/> <copyField source="fieldB" dest="fieldD"/> <copyField source="fieldC" dest="fieldD"/>
I want the facet values ββof a string of multiple words to be exactly the same as the string of multiple words in field values. Please suggest.
source share