diff --git a/dashboard/src/app/albums/albums.component.html b/dashboard/src/app/albums/albums.component.html
index 26aea7a..466698f 100644
--- a/dashboard/src/app/albums/albums.component.html
+++ b/dashboard/src/app/albums/albums.component.html
@@ -1,5 +1,5 @@
-
Albums
+
Albums - {{this.albums.length}}
diff --git a/dashboard/src/app/albums/albums.component.ts b/dashboard/src/app/albums/albums.component.ts
index 9d70637..917d396 100644
--- a/dashboard/src/app/albums/albums.component.ts
+++ b/dashboard/src/app/albums/albums.component.ts
@@ -35,12 +35,8 @@ export class AlbumsComponent implements OnInit {
// If firt edit, add needed fields in ELS Query
if (!this.filterQuery['query']) {
- this.filterQuery['query'] = {
- 'bool': {
- 'must': [],
- 'must_not': []
- }
- }
+ this.filterQuery['query']['bool'][type].push({ 'must': [] })
+ this.filterQuery['query']['bool'][type].push({ 'must_not': [] })
}
diff --git a/dashboard/src/app/els-album.service.ts b/dashboard/src/app/els-album.service.ts
index 1650572..73a7e60 100644
--- a/dashboard/src/app/els-album.service.ts
+++ b/dashboard/src/app/els-album.service.ts
@@ -10,11 +10,16 @@ import { ElsService } from './els.service';
@Injectable()
export class ElsAlbumService extends ElsService {
public static readonly GET_ALBUMS_DEFAULT_QUERY = {
- 'sort': [ {
- 'Avg Bit Rate': {
- 'order': 'asc'
+ 'query': {
+ 'bool': {
+ 'must': [],
+ 'must_not': [],
+ 'filter': [
+ { 'range': { 'Avg Bit Rate': { 'lte': '128'}}}
+ ]
}
- }, {
+ },
+ 'sort': [ {
'_script' : {
'type' : 'number',
'script' : {
@@ -23,8 +28,12 @@ export class ElsAlbumService extends ElsService {
},
'order' : 'desc'
}
+ }, {
+ 'Avg Bit Rate': {
+ 'order': 'asc'
+ }
} ],
- 'size': ElsService.DEFAULT_SIZE
+ 'size': 500
}
constructor(protected http: HttpClient) {