Search in sources :

Example 1 with SearchIndexes

use of org.jbei.ice.lib.search.SearchIndexes in project ice by JBEI.

the class Entries method getSearchResults.

private List<Long> getSearchResults(SearchQuery searchQuery) {
    SearchIndexes searchIndexes = new SearchIndexes();
    SearchResults searchResults = searchIndexes.runSearch(userId, searchQuery);
    // todo : inefficient: have search return ids only
    List<Long> results = new LinkedList<>();
    for (SearchResult result : searchResults.getResults()) {
        results.add(result.getEntryInfo().getId());
    }
    return results;
}
Also used : SearchIndexes(org.jbei.ice.lib.search.SearchIndexes) SearchResult(org.jbei.ice.lib.dto.search.SearchResult) SearchResults(org.jbei.ice.lib.dto.search.SearchResults)

Aggregations

SearchResult (org.jbei.ice.lib.dto.search.SearchResult)1 SearchResults (org.jbei.ice.lib.dto.search.SearchResults)1 SearchIndexes (org.jbei.ice.lib.search.SearchIndexes)1