* @param question
* @return
*/
public static GlobalSearchItem convertQuestionToSearchItem(
final Question question) {
final GlobalSearchItem globalSearchItem = new GlobalSearchItem();
globalSearchItem.setUrlLocation("/question/detail/" + question.getQid() + "/" + RestFullUtil.slugify(question.getQuestion()));
globalSearchItem.setHits(question.getHits());
globalSearchItem.setId(question.getQid());
globalSearchItem.setItemSearchTitle(question.getQuestion());
globalSearchItem.setDateCreated(question.getCreateDate());
globalSearchItem.setItemPattern(question.getQuestionPattern().name());
globalSearchItem.setTypeSearchResult(TypeSearchResult.QUESTION);
globalSearchItem.setScore(100L); //FIXME: fixed number?
return globalSearchItem;
}