We'd like to change the search results in our Mirage2 theme to show just 
the first N words in abstracts. We do NOT want to show the search hits in 
context as we've found this is not useful to users. I honestly thought that 
the following code would suffice:

<xsl:choose>                       
    <!-- abstract exists-->
    <xsl:when test="dri:list[@n=(concat($handle, 
':dc.description.abstract'))]/dri:item">
        <div class="abstract">                          
            <xsl:value-of 
select="util:shortenString(dri:list[@n=(concat($handle, 
':dc.description.abstract'))]/dri:item[1], 220, 10)"/>
            <br/>
        </div>
    </xsl:when>
    
    <!-- search hit but no abstract to show -->
    <xsl:otherwise>
        <div class="abstract">
            <em>No abstract or description.</em>
        </div>
    </xsl:otherwise>
</xsl:choose>

The problem is that on some items, we don't get the abstract from the 
beginning. Instead, if there's a search hit in the middle of the abstract, 
we still get the snippets showing the search term in context. 

Do I need to turn off hit highlighting or some other feature?

Thanks!

kate

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to