Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.ArrayList;
import java.util.Map;

import org.alliancegenome.api.service.helper.SearchHelper;
import org.alliancegenome.es.index.site.dao.AutoCompleteDAO;
import org.alliancegenome.es.model.search.AutoCompleteResult;
import org.alliancegenome.es.model.search.Category;
Expand All @@ -25,7 +24,6 @@
public class AutoCompleteService {

private static AutoCompleteDAO autoCompleteDAO = new AutoCompleteDAO();
private SearchHelper searchHelper = new SearchHelper();

@Inject SearchService searchService;

Expand Down Expand Up @@ -83,6 +81,7 @@ public ArrayList<Map<String, Object>> formatResults(SearchResponse res) {
//seems like maybe it could also use name_key for everyone...
if (StringUtils.equals(category, Category.GENE.getName())) {
hit.getSourceAsMap().put("name", hit.getSourceAsMap().get("symbol"));
hit.getSourceAsMap().put("name_key", hit.getSourceAsMap().get("nameKey"));
}
ret.add(hit.getSourceAsMap());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class AutoCompleteDAO extends ESDAO {

private List<String> responseFields = Arrays.asList(
"name_key", "name", "symbol", "primaryKey", "category", "go_type"
"name", "symbol", "curie", "primaryKey", "category", "go_type", "name_key", "nameKey"
);

public SearchResponse performQuery(QueryBuilder query) {
Expand Down
Loading