I have a Drupal 7 site using the Search API and Search API Apache SOLR modules to provide search functionality to site visitors.
I'm running Apache SOLR 4.10.2 within my development Vagrant VM environment, and search results are returned for both stemmed and unstemmed terms which is great:
Example search term: "car"
Apache SOLR returns nodes with fields containing the text "car" and "cars"
The problem is, when Apache Solr returns nodes containing the stemmed term "cars", no highlighted excerpts are returned. However results containing the exact term "car" are returned with a hightlighted excerpt as expected.
After extensive searching I found this blog post which contains instructions on how to enable stemming for highlighted excerpts, but no luck.
Here is the excerpt of my schema.xml config file as per the instructions in the blog post:
<!-- Setup simple analysis for spell checking -->
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.LengthFilterFactory" min="4" max="20" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
I have restarted my VM and cleared and reindexed all the nodes, but still no dice.
Has anyone else had this issue before?
Thanks in advance!