Now I am thinking about splitting the input text myself to terms, then searching and ranking the documents for each term. Finally summing the scores by document. This way the documents with more matching terms would get greater score.
Please anybody let me know if there is some better/easier solution for this.