Faceting on something like a full author name with Solr and Haystack is a bit tricky. One way to solve this is to set up Solr to have a copy of your author information in a string field instead of a text_ws field to avoid stemming and splitting on whitespace.
Schema.XML:
<!-- Author field to facet on (we might have multiple authors) -->
<field name="author" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<field name="author_exact" type="string" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<copyField source="author" dest="author_exact" />
Then in your customized search view (perhaps in get_results
), instead of faceting on your author
field, we facet on author_exact
: