When Oracle sued Google in August 2010 alleging widespread infringement of Java-related copyrights and patents in Android, the company was looking for a $6 billion payout. But Oracle got nothing when a court ruled in Google's favor in May of this year, and is now being ordered to pay $1.13 million worth of Google's court costs.

Each side likely poured millions or even tens of millions into the patent and copyright trial. Winning reimbursement for legal costs isn't easy, but Google has managed to pull it off, at least partially. Yesterday, Judge William Alsup of US District Court in Northern California ruled on Google's request for $4.03 million, denying $2.9 million worth of requested reimbursements but granting the rest of it.

"Oracle initially sought six billion dollars in damages and injunctive relief but recovered nothing after nearly two years of litigation and six weeks of trial," Alsup wrote in the order. "Oracle initially alleged infringement of seven patents and 132 claims but each claim ultimately was either dismissed with prejudice or found to be non-infringed by the jury. Oracle also lost on its primary copyright claim for Java APIs." As Oracle's patent allegations disintegrated, Oracle fell back on an "overreaching" and "somewhat novel" theory of copyright infringement to bolster its case, Alsup noted.

As for reimbursements, Alsup looked favorably upon Google's request for fees to cover the work of expert witness James Kearl, pointing to legal precedent allowing reimbursement for fees paid to court-appointed experts. Alsup denied Google's request to be reimbursed for e-discovery costs paid to vendor FTI Consulting, however, saying they consist of nonreimbursable "intellectual efforts."

"The problem with Google’s e-discovery bill of costs is that many of [the] item-line descriptions seemingly bill for 'intellectual effort' such as organizing, searching, and analyzing the discovery documents," Alsup wrote. "Most egregious are attempts to bill costs for 'conferencing,' 'prepare for and participate in kickoff call,' and communications with co-workers, other vendors, and clients."

You can read Alsup's ruling over at Groklaw. Naturally, this case isn't really over. It's heading to appeal—with Oracle in the midst of a losing streak.