Solr, DataImportHandler, UUID and SQL Server

I’ve recently been setting up Apache Lucene/Solr to index static PDF files and also import data to the collection from MS SQL Server.

After successfully indexing PDF files and providing them with a unique id via UUID I wanted to import several SQL tables that each had a ID column called ‘id’. These tables would obvioulsy have overlapping ID’s at some stage so I wanted to use UUID on these documents as well.

I struggles to find much documentation on Solr, SQL Server and UUID, but after successfully setting up UUID via, you also need to the UpdateRequestHander on the dataimport handler as well. Therefore the following code:

<requestHandler name=”/dataimport” class=”org.apache.solr.handler.dataimport.DataImportHandler”>
<lst name=”defaults”>
<str name=”config”>db-data-config.xml</str>

changed to this

<requestHandler name=”/dataimport” class=”org.apache.solr.handler.dataimport.DataImportHandler”>
<lst name=”defaults”>
<str name=”config”>db-data-config.xml</str>
<str name=”update.chain”>uuid</str>

then auto creates unique id’s when importing on mass from SQL Server tables.

Resize VMWare Disk

I was looking for a simple slider to resize a disk in VMWare server recently and its not that simple if you want to resize a disk.
The solution is detailed in more detail here, but essentially you need run the following command on the host of the VMware machine:

vmware-vdiskmanager -x 30GB D:\VirtualMachines\virtualMachine1\virtualMachine1.vmdk

The above command essentially will resize the disk for virtualMachine1 to 30GB.

vmware-vdiskmanager is located in the installation directory as detailed here, but the following table gives common locations under 32 bit windows:

Workstation \Program Files\VMware\VMware Workstation
Player / ACE Instance \Program Files\VMware\VMware Player
VMware Server \Program Files\VMware\VMware Server
GSX \Program Files\VMware\VMware GSX Server
Converter \Program Files\VMware\VMware Converter
Capacity Planner \Program Files\VMware\VMware Capacity Planner
Lab Manager \Program Files\VMware\VMware Lab Manager Server
Stage Manager \Program Files\VMware\VMware Stage Manager Server
Virtual Desktop Manager \Program Files\VMware\VMware VDM\Server
Consolidated Backup \Program Files\VMware\VMware Consolidated Backup Framework
VirtualCenter 2.5.x \Program Files\VMware\Infrastructure\VirtualCenter Server
VirtualCenter 2.0.x \Program Files\VMware\VMware VirtualCenter 2.0
Virtual Infrastructure Client 2.5.x \Program Files\VMware\VMware Virtual Infrastructure Client 2.0
Virtual Infrastructure Client 2.0.x \Program Files\VMware\Infrastructure\Virtual Infrastructure Client
Server Console (VMware Server) \Program Files\VMware\VMware Server Console
Remote Console (GSX) \Program Files\VMware\VMware Remote Console

The original Discount Voucher/voucher code sites

Online discount vouchers and discount codes are now accepted as the norm in online shopping. The number of ‘voucher codes’ sites is near saturation point in the UK, so it’s worth remembering which web sites started the trend and what they are offering online consumers.

One the original sites I used to use was UK Frenzy ( back in around 2002/2003. UK Frenzy was one of the original sites for online vouchers and regularly featured Amazon, Dell, Dixons and Comet Vouchers. Today they are still offering information in pretty much the same format and also have a fairly active forum of users sharing vouchers and online bargains.

The second site is started to use around 2005 was HotUKDeals ( This site started small and rapidly grew into a massive list of product offers, deals and merchant specific voucher codes. Over the years the categorisation has changed but the site still offers a vast amount of fantastic buyer’s advice.

A third site that featured heavily in my online purchasing for sourcing bargains and money saving opportunities was Martin Lewis’s Money Saving Expert ( In particular it was the user forums and specifically the Discount Vouchers and Discount Codes forum. Over the years Martin’s site has grown from strength to strength and is regularly featured on the BBC, but the true value of this site is its users. I regularly check back here to search for merchant vouchers.

The following two sites are close to my heart but also worth a mention.

Greedymoose ( was a site I set up in 2004 and ran till 2005/06. It hasn’t received much in the way of updates since then but at its time was heavily visited voucher code site that produced some good revenue. At its heyday it ran several unique discount vouchers that can still be found on some the later ‘voucher code’ sites – but at the time these were unique to GreedyMoose. Maybe soon GreedyMoose will have revamp – watch this space.

The final site that will be mentioned is UK Discount Vouchers ( UK Discount Vouchers (UKDV) was formed in mid 2004 as a user’s forum for discount vouchers and sharing them easily with fellow shoppers. This worked to a certain degree but forum spammers eventually got too much and the site was changed to a Blog in August 2006. Since 2006 the site has grown and has now transformed into a store specific site where users can access their favourite shops and easily check for discount vouchers and codes for that store.

So that’s a brief round-up of my original voucher code sites that I used and developed.