Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rematch optimising #308

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Merge branch 'develop' into rematch
  • Loading branch information
hamzajaved-csiro committed Jun 21, 2024
commit 4d01dbb481ad355d3000d2e7362ce7ca94376338
10 changes: 6 additions & 4 deletions grails-app/services/au/org/ala/specieslist/QueryService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,11 @@ class QueryService {
"${q ? 'and (sli.matchedName like :qMatchedName or sli.commonName like :qCommonName or sli.rawScientificName like :qRawScientificName) ' : ''} " +
"group by sli.family order by cnt desc",
queryParameters)
// `if (commonResults.size() > 1) {
// map["family_matched"] = commonResults
// }`

if (commonResults.size() > 1) {
map[MATCHED_FAMILY] = commonResults
}


//println(results)
properties = results.findAll{ it[1] && it[1]?.length()<maxLengthForFacet }.groupBy { it[0] }.findAll{ it.value.size()>1}
Expand All @@ -948,7 +950,7 @@ class QueryService {
'group by family order by cnt desc',
queryParameters)
if(commonResults.size() > 1) {
map["family_matched"] = commonResults
map[MATCHED_FAMILY] = commonResults
}
}
//if there was a facet included in the result we will need to divide the
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.