what do you mean by "relevance formula"?
You can implement your own Similarity measurement in lucene and change it at query time, so I'm guessing you mean something else?
http://indextank.com/documentation/function-definition
(Feedback on this documentation is more than welcome, it's a work in progress!)