[develop | DONE | ADDED] add method for grouped count queries that goes through the cache
This commit is contained in:
parent
622459c26c
commit
6b907fe97d
|
@ -133,7 +133,14 @@ export class SearchResearchResultsService {
|
|||
return this.http.get((properties.useLongCache && size == 0 && !params && (!refineQuery || !refineQuery.includes("fq="))) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
|
||||
}
|
||||
countResults(field:string,value:string): any {
|
||||
let url = properties.utilsService + "/portals/countResults";
|
||||
if (field && value) {
|
||||
url += "?field=" + encodeURIComponent(field) + "&value="+encodeURIComponent(value);
|
||||
}
|
||||
|
||||
return this.http.get((properties.useLongCache ) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||
}
|
||||
searchResultForEntity(resultType: string, params: string, page: number, size: number, properties: EnvProperties): any {
|
||||
let link = properties.searchAPIURLLAst;
|
||||
//let url = link+params+"/"+this.getEntityQueryName(resultType,true)+ "?format=json";
|
||||
|
|
Loading…
Reference in New Issue