Commit 53414d69 authored by Gert Paimla's avatar Gert Paimla

agg hide current search

parent e56d464f
{
"name": "texta",
"version": "1.4.2",
"version": "1.4.3",
"scripts": {
"ng": "ng",
"start": "ng serve",
......
......@@ -41,8 +41,7 @@
</button>
<mat-checkbox class="exclude-search-checkbox" [(ngModel)]="searchQueryExcluded"
labelPosition="before">Exclude current
search:
labelPosition="before">Hide current search in results:
</mat-checkbox>
<div class="max-width">
......
import {Component, OnDestroy, OnInit} from '@angular/core';
import {pairwise, takeUntil} from 'rxjs/operators';
import {Field, Project, ProjectFact, ProjectIndex} from '../../../shared/types/Project';
import {Field, Project, ProjectIndex} from '../../../shared/types/Project';
import {ProjectStore} from '../../../core/projects/project.store';
import {BehaviorSubject, forkJoin, of, Subject} from 'rxjs';
import {FormControl} from '@angular/forms';
......@@ -88,7 +88,7 @@ export class AggregationsComponent implements OnInit, OnDestroy {
const aggregationType = Object.keys(joinedAggregation)[0];
const body: any = {
query: {
aggs: {...joinedAggregation},
aggs: {...!this.searchQueryExcluded ? joinedAggregation : {}},
size: 0 // ignore results, performance improvement
},
indices: this.projectFields.map(y => y.index)
......
......@@ -4,7 +4,7 @@
export const environment = {
// apiUrl: 'https://rest-dev.texta.ee/api/v1',
apiHost: 'http://localhost',
apiHost: 'https://rest-dev.texta.ee',
apiBasePath: '/api/v1',
production: false
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment