I’ve implemented new neat feature (to store unique content only once in cache) to my perl based etl tool and suddenly it started to print sometimes ‘Wide character in subroutine entry‘ perl warning in sha1_hex call. As if this was not enough processed content after being stored in cache started to be utf-8 corrupted in comparition to the one stored in the cache.
It took few funny hours with of playing with perl, till I’ve found that sha1_hex function somehow destroyed parameter content but in such a beautiful way, that it was almost impossible to detect it. What the best is the cached content was output of LibXML toString() function, but the XML tree itself (or what) has been also corrupted. Well it must one of that ‘perl secrets’.
Afterwards Google given me some explanation of this activity – I’ve found similar problem reported for md5_sum function from digest::md5 package.
So finally to fix that problem, one must call encode_utf8() on sha1_hex parameter to let sha1_hex work on this copied content.
Released solr_pager 0.2.2. This release fixes little bug that prevented solr_pager to work in some configurations (ie. with standard search handler). Well, Solr documentation did not mentioned that it can pass empty (null) result set to my component.
Also added some sanity checks to prevent similar situation again.
New version can be found on http://devel.dob.sk/solr_pager, enjoy.
Released solr_pager 0.2.1, an feature update with improved first/last page navigation. Now they appear in result only when first/last page is not visible in generated paging list.
This version can be found on http://devel.dob.sk/solr_pager, for more informations about how it works see this post.
Just released passwd_exp version 1.2.11 with small feature fix for email seding. Download here.
passwd_exp is a highly customizable but easy to setup email password/account expiration notifier.
I’ve just published solr_pager a search component for Solr that should make paging easier. It’s main use should be by XSLT transformation (using XSLT writer), so one should not bother anymore with slow recursive XSLT hacks and only apply fast templates on paging list in search result.
Initial version 0.2.0 can be found on http://devel.dob.sk/solr_pager. Documentation is bundled 
I’ve tested it against development version of Solr 1.4, but I think it should works also with currently stable Solr 1.3 (If not let me know, I’ll try to fix it).
How it works:
After install Solr Pager and configuring Solr to use Pager component for results (see README file), one should simply pass pager parameter with number of pager starts that should be generated (pager=10) to search query and list of pager start will be returned in response, smth. like this:
<response>
<lst name="pager">
<lst name="pages"> <!-- list of all pages -->
<int name="2">25</int>
<int name="3">50</int>
<int name="4">75</int> <!-- this is actual page -->
<int name="5">100</int>
<int name="6">125</int>
<int name="7">150</int>
<int name="8">175</int>
<int name="9">200</int>
<int name="10">225</int>
<int name="11">250</int>
</lst>
<int name="prev">50</int> <!-- previous page, with start = 50 -->
<int name="next">100</int> <!-- next page, with start = 75 -->
<int name="last">1225</int> <!-- last page, with start = 1225 -->
<int name="actual">4</int> <!-- actual page number -->
<int name="count">49</int> <!-- count of all pages -->
</lst>
</response>
There is also another parameter pager.pre that sets how many proceeding pager starts should be generated, one pager start will be generated for actual page and all other pages will be pager starts of pages following the actual page.
Name is position of the page starting from 1 and node value is parameter (document position) that should be passed back to solr as value for start parameter.
It’s simple component, so it should have no bugs (HA HA), but if found any plz. report them to me. Also if you have some interesting and usable feature or patch that could be added to Solr Pager, again,don’t be ashamed and let me know.