Skip to content

Commit

Permalink
Merge pull request #240 from charvolant/master
Browse files Browse the repository at this point in the history
Fix for image search failing
  • Loading branch information
charvolant authored Apr 8, 2019
2 parents 7dc648a + ceaf712 commit cde5322
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class SearchController {
*/
// Documented in openapi.yml
def imageSearch(){
render ([searchResults:searchService.imageSearch(regularise(params.id), params.start, params.rows, params.qc)] as JSON)
def start = params.start as Integer
def rows = params.rows as Integer
render ([searchResults:searchService.imageSearch(regularise(params.id), start, rows, params.qc)] as JSON)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion grails-app/services/au/org/ala/bie/SearchService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SearchService {
if(!taxon){
return []
}
def tid = Encoder.encodeQuery(taxon.guid)
def tid = Encoder.escapeSolr(taxon.guid)
query = "(guid:\"${tid}\" OR rkid_${taxon.rank.toLowerCase().replaceAll('\\s', '_')}:\"${tid}\")"
}

Expand Down

0 comments on commit cde5322

Please sign in to comment.