query.set(CommonParams.QT, "/spell");
query.set("spellcheck", true);
query.set(SpellingParams.SPELLCHECK_BUILD, true);
query.set(SpellingParams.SPELLCHECK_COUNT, 10);
query.set(SpellingParams.SPELLCHECK_COLLATE, true);
QueryRequest request = new QueryRequest(query);
SpellCheckResponse response = request.process(server).getSpellCheckResponse();
response = request.process(server).getSpellCheckResponse();
assertTrue("name:(+faith +homer +loaves)".equals(response.getCollatedResult()));
//Test Expanded Collation Results
query.set(SpellingParams.SPELLCHECK_COLLATE_EXTENDED_RESULTS, true);
query.set(SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, 10);
query.set(SpellingParams.SPELLCHECK_MAX_COLLATIONS, 2);
request = new QueryRequest(query);
response = request.process(server).getSpellCheckResponse();
assertTrue("name:(+faith +hope +love)".equals(response.getCollatedResult()) || "name:(+faith +hope +loaves)".equals(response.getCollatedResult()));
List<Collation> collations = response.getCollatedResults();
assertTrue(collations.size()==2);
for(Collation collation : collations)