Skip to content

Commit

Permalink
Merge pull request #97 from GenomicDataInfrastructure/Revert-sort-tit…
Browse files Browse the repository at this point in the history
…le-string

Revert sort title string
  • Loading branch information
brunopacheco1 authored Aug 22, 2024
2 parents e4bfe57 + 0795bdf commit f94ce62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,10 @@ private DatasetsSearchResponse enhanceDatasetsResponse(
private DatasetsSearchResponse searchCkan(DatasetSearchQuery query, String ckanAuthorization) {
var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(query);

String sortString = query.getSort();

if (sortString != null) {
if (sortString.contains("title") && !sortString.contains("title_string")) {
sortString = sortString.replace("title", "title_string");
}
}

var response = ckanQueryApi.packageSearch(
query.getQuery(),
facetsQuery,
sortString,
query.getSort(),
query.getRows(),
query.getStart(),
selectedFacets,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,10 @@ public CkanDatasetsRepository(
public DatasetsSearchResponse search(DatasetSearchQuery query, String accessToken) {
var facetsQuery = CkanFacetsQueryBuilder.buildFacetQuery(query);

String sortString = query.getSort();
if (sortString != null) {
if (sortString.contains("title") && !sortString.contains("title_string")) {
sortString = sortString.replace("title", "title_string");
}
}

var response = ckanQueryApi.packageSearch(
query.getQuery(),
facetsQuery,
sortString,
query.getSort(),
query.getRows(),
query.getStart(),
SELECTED_FACETS,
Expand Down

0 comments on commit f94ce62

Please sign in to comment.