Not quite sure if this is the correct place to post this or not?
Think I have discovered a bug in the FullTextSearch project.
It works fine, but appears to be calculating the Number of Pages incorrectly?
On the site I'm working on, I have set paging for 5 results per Page. If the number of results is a multiple of 5, it calculates Number of Pages incorrectly?
e.g. 10 results, the XML returned by the DLL is 3 <summary numResults="10" numPages="3" timeTaken="0.009" firstResult="1" lastResult="5" />
To fix this I have modifed the xslt to get it work properly:
Bug in FullTextSearch Project
Hi,
Not quite sure if this is the correct place to post this or not?
Think I have discovered a bug in the FullTextSearch project.
It works fine, but appears to be calculating the Number of Pages incorrectly?
On the site I'm working on, I have set paging for 5 results per Page.
If the number of results is a multiple of 5, it calculates Number of Pages incorrectly?
e.g. 10 results, the XML returned by the DLL is 3
<summary numResults="10" numPages="3" timeTaken="0.009" firstResult="1" lastResult="5" />
To fix this I have modifed the xslt to get it work properly:
OLD XSLT:
<xsl:if test="number($searchResults/results/summary/@numPages) > 1">
<xsl:call-template name="pagination">
<xsl:with-param name="numPages" select="$searchResults/results/summary/@numPages" />
<xsl:with-param name="pageNumber" select="$pageNumber" />
</xsl:call-template>
</xsl:if>
NEW XSLT:
<xsl:if test="number($searchResults/results/summary/@numResults) > 5">
<xsl:call-template name="pagination">
<xsl:with-param name="numPages" select="number($searchResults/results/summary/@numResults) div 5" />
<xsl:with-param name="pageNumber" select="$pageNumber" />
</xsl:call-template>
</xsl:if>
is working on a reply...