// final Query query = new QueryParser("", new
// KeywordAnalyzer()).parse(fieldName + ": " + queryTerm);
final Query query = new QueryParser(Version.LUCENE_30, "", new KeywordAnalyzer()).parse(fieldName + ": "
+ queryTerm);
final TopDocs searchResultsLucene;
final Hits searchResultsKatta;
if (sort == null) {
searchResultsLucene = indexSearcher.search(query, resultCount);
searchResultsKatta = _client.search(query, new String[] { kattaIndexName }, resultCount);
} else {
searchResultsLucene = indexSearcher.search(query, null, resultCount, sort);
searchResultsKatta = _client.search(query, new String[] { kattaIndexName }, resultCount, sort);
}
assertEquals(searchResultsLucene.totalHits, searchResultsKatta.size());
ScoreDoc[] scoreDocs = searchResultsLucene.scoreDocs;
List<Hit> hits = searchResultsKatta.getHits();
if (sort == null) {
for (int i = 0; i < scoreDocs.length; i++) {
assertEquals(scoreDocs[i].score, hits.get(i).getScore(), 0.0);
}
} else {