From a3c1599075b7485b955deb573bfc1b571ac20f18 Mon Sep 17 00:00:00 2001 From: MalteRei Date: Fri, 3 Apr 2020 18:31:02 +0200 Subject: [PATCH] Change query to be more like the results on betterplace.org Now the results are pretty much the same as the results on betterplace.org for searching corona. #19 --- .../spendensport/src/app/search-bar/search-bar.component.ts | 2 -- .../spendensport/src/app/services/betterplace-search.service.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/spendensport/src/app/search-bar/search-bar.component.ts b/frontend/spendensport/src/app/search-bar/search-bar.component.ts index a2ac847..f4433e1 100644 --- a/frontend/spendensport/src/app/search-bar/search-bar.component.ts +++ b/frontend/spendensport/src/app/search-bar/search-bar.component.ts @@ -19,8 +19,6 @@ export class SearchBarComponent implements OnInit { } public donationSearch(event: KeyboardEvent) { - console.log('donation search'); - console.dir((event.target as HTMLInputElement).value); if ((event.target as HTMLInputElement).value.length > 3) { if((event.target as HTMLInputElement).value !== this.previousSearchTerm && event.key !== 'Enter') { this.SearchProvider.search((event.target as HTMLInputElement).value); diff --git a/frontend/spendensport/src/app/services/betterplace-search.service.ts b/frontend/spendensport/src/app/services/betterplace-search.service.ts index 27f7f22..454e380 100644 --- a/frontend/spendensport/src/app/services/betterplace-search.service.ts +++ b/frontend/spendensport/src/app/services/betterplace-search.service.ts @@ -27,7 +27,7 @@ export class BetterplaceSearchService implements OnDestroy, ISearchProvider( this.configServices.config.donationApiUrl - + 'projects.json?around=Germany&facets=completed%3Afalse|closed%3Afalse|prohibit_donations%3Afalse&order=rank%3ADESC&q='+query) + + 'projects.json?facets=completed%3Afalse|closed%3Afalse|prohibit_donations%3Afalse&order=score%3Adesc|completed%3Aasc|rank%3Adesc|last_donation_at%3Adesc&q='+query) .pipe(retry(3)) .pipe(takeUntil(this.ngUnsubscribe)) .subscribe((searchResult: IBetterplaceResponseProjects) => {