Compare commits
2 Commits
153ca835cb
...
797c88f946
| Author | SHA1 | Date | |
|---|---|---|---|
| 797c88f946 | |||
| 1f427749cf |
@@ -1,5 +1,5 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Albums</h1>
|
<h1>Albums - {{this.albums.length}}</h1>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<table class="table table-striped" style="white-space: nowrap;">
|
<table class="table table-striped" style="white-space: nowrap;">
|
||||||
|
|||||||
@@ -35,12 +35,8 @@ export class AlbumsComponent implements OnInit {
|
|||||||
|
|
||||||
// If firt edit, add needed fields in ELS Query
|
// If firt edit, add needed fields in ELS Query
|
||||||
if (!this.filterQuery['query']) {
|
if (!this.filterQuery['query']) {
|
||||||
this.filterQuery['query'] = {
|
this.filterQuery['query']['bool'][type].push({ 'must': [] })
|
||||||
'bool': {
|
this.filterQuery['query']['bool'][type].push({ 'must_not': [] })
|
||||||
'must': [],
|
|
||||||
'must_not': []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,16 @@ import { ElsService } from './els.service';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class ElsAlbumService extends ElsService {
|
export class ElsAlbumService extends ElsService {
|
||||||
public static readonly GET_ALBUMS_DEFAULT_QUERY = {
|
public static readonly GET_ALBUMS_DEFAULT_QUERY = {
|
||||||
'sort': [ {
|
'query': {
|
||||||
'Avg Bit Rate': {
|
'bool': {
|
||||||
'order': 'asc'
|
'must': [],
|
||||||
|
'must_not': [],
|
||||||
|
'filter': [
|
||||||
|
{ 'range': { 'Avg Bit Rate': { 'lte': '128'}}}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
'sort': [ {
|
||||||
'_script' : {
|
'_script' : {
|
||||||
'type' : 'number',
|
'type' : 'number',
|
||||||
'script' : {
|
'script' : {
|
||||||
@@ -23,8 +28,12 @@ export class ElsAlbumService extends ElsService {
|
|||||||
},
|
},
|
||||||
'order' : 'desc'
|
'order' : 'desc'
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'Avg Bit Rate': {
|
||||||
|
'order': 'asc'
|
||||||
|
}
|
||||||
} ],
|
} ],
|
||||||
'size': ElsService.DEFAULT_SIZE
|
'size': 500
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(protected http: HttpClient) {
|
constructor(protected http: HttpClient) {
|
||||||
|
|||||||
@@ -1,4 +1,28 @@
|
|||||||
{
|
{
|
||||||
|
"settings": {
|
||||||
|
"analysis": {
|
||||||
|
"analyzer": {
|
||||||
|
"custom_path_tree": {
|
||||||
|
"tokenizer": "custom_hierarchy"
|
||||||
|
},
|
||||||
|
"custom_path_tree_reversed": {
|
||||||
|
"tokenizer": "custom_hierarchy_reversed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tokenizer": {
|
||||||
|
"custom_hierarchy": {
|
||||||
|
"type": "path_hierarchy",
|
||||||
|
"delimiter": "/",
|
||||||
|
"skip": 3
|
||||||
|
},
|
||||||
|
"custom_hierarchy_reversed": {
|
||||||
|
"type": "path_hierarchy",
|
||||||
|
"delimiter": "/",
|
||||||
|
"reverse": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"mappings" : {
|
"mappings" : {
|
||||||
"properties": {
|
"properties": {
|
||||||
"Artist": {
|
"Artist": {
|
||||||
@@ -27,6 +51,19 @@
|
|||||||
},
|
},
|
||||||
"Kind": {
|
"Kind": {
|
||||||
"type": "keyword"
|
"type": "keyword"
|
||||||
|
},
|
||||||
|
"Location": {
|
||||||
|
"type": "text",
|
||||||
|
"fields": {
|
||||||
|
"tree": {
|
||||||
|
"type": "text",
|
||||||
|
"analyzer": "custom_path_tree"
|
||||||
|
},
|
||||||
|
"tree_reversed": {
|
||||||
|
"type": "text",
|
||||||
|
"analyzer": "custom_path_tree_reversed"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user