Introduction - If you have any usage issues, please Google them yourself
You can use Carrot2 Java API to fetch documents various sources (public search engines, Lucene, Solr), perform clustering, serialize the results to JSON or XML and many more. Below is some example code for the most common use cases. Please see the examples/ directory in the Java API distribution archive for more examples.