Adding Date Information to Magnify Search Results

How to:

By default, Magnify includes the date in which a record was indexed in the datetime field of the index. If date information was provided for each record during the feed process, the value is stored in the datetime field of the index. Once the date and time information is available in the index, the Magnify style sheet can be modified to display the date information for each search result and change the date format, if necessary. The date information is displayed by default.


Top of page

x
Procedure: How to Display Date and Time Information
  1. Edit the \ibi\WebFOCUS\config\magnify\magnify_stylesheet.xslt file.
  2. Locate the show_crawldate variable in the style sheet.
    <xsl:variable name="show_crawldate">0</xsl:variable>
  3. Change the show_crawldate variable value to 1 as follows:
    <xsl:variable name="show_crawldate">1</xsl:variable>
  4. Restart the application server on which Magnify is installed.

    The next time a search is performed, the date information is displayed in the search results:


Top of page

x
Procedure: How to Remove Time Information
  1. Edit the \ibi\WebFOCUS\config\magnify\magnify_stylesheet.xslt file.
  2. Locate the following syntax:
    MT[@N='date']
  3. Modify the date variable as follows:
    <xsl:param name="datestr" select="MT[@N='date']/@V"/>
    <xsl:value-of disable-output-escaping='yes' select='substring($datestr,1,10)'/>

WebFOCUS