Just finished adding support for spell checking in Compass (available in the nightly builds) which turned out a really cool and easy to use feature. In order to enable spell check in Compass, all that needs to be done is set the following property:
compass.engine.spellcheck.enable=true
Next, in the code that performs the search, the following can be done:
CompassQuery query = session.queryBuilder().queryString(“fiv”).toQuery();
CompassHits hits = query.hits();
System.out.println("Original Query: " + hits.getQuery());
if (hits.getSuggestedQuery().isSuggested()) {
System.out.println("Did You Mean: " + hits.getSuggestedQuery());
}
Naturally, there are many ways to configure and control this feature, which are all explained in the reference docs, but this is the gist of it.