Storing (java) and retreving (php) content similarity