use of com.tyndalehouse.step.core.service.helpers.GlossComparator in project step by STEPBible.
the class SearchServiceImpl method setDefinitionForResults.
/**
* Sets the definitions onto the result object
*
* @param result the result object
* @param lexiconDefinitions the definitions that have been included in the search
*/
private void setDefinitionForResults(final SearchResult result, final List<EntityDoc> lexiconDefinitions, SuggestionType suggestionType) {
Collections.sort(lexiconDefinitions, new GlossComparator());
List<LexiconSuggestion> suggestions = new ArrayList(lexiconDefinitions.size());
for (final EntityDoc def : lexiconDefinitions) {
suggestions.add(convertToSuggestion(def, null));
}
result.setDefinitions(suggestions);
}
Aggregations