mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 01:38:54 +00:00
Update ES index creation and population scripts
This commit is contained in:
@@ -12,6 +12,25 @@ $releases_index = [
|
||||
'number_of_shards' => 2,
|
||||
'number_of_replicas' => 0,
|
||||
],
|
||||
'mappings' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'long',
|
||||
'index' => false
|
||||
],
|
||||
'name' => ['type' => 'text'],
|
||||
'searchname' => [
|
||||
'type' => 'text',
|
||||
'fields' => [
|
||||
'sort' => [
|
||||
'type' => 'keyword'
|
||||
]
|
||||
]
|
||||
],
|
||||
'fromname' => ['type' => 'text'],
|
||||
'filename' => ['type' => 'text'],
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
@@ -28,7 +47,26 @@ $predb_index = [
|
||||
'number_of_shards' => 2,
|
||||
'number_of_replicas' => 0,
|
||||
],
|
||||
'mappings' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'long',
|
||||
'index' => false
|
||||
],
|
||||
'title' => [
|
||||
'type' => 'text',
|
||||
'fields' => [
|
||||
'sort' => [
|
||||
'type' => 'keyword'
|
||||
]
|
||||
]
|
||||
],
|
||||
'filename' => ['type' => 'text'],
|
||||
'source' => ['type' => 'text'],
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
$response = \Elasticsearch::indices()->create($predb_index);
|
||||
|
||||
@@ -73,7 +73,6 @@ function populate_indexes($table, $max)
|
||||
$data['body'][] = [
|
||||
'index' => [
|
||||
'_index' => 'releases',
|
||||
'_type' => 'releases',
|
||||
'_id' => $row->id,
|
||||
],
|
||||
];
|
||||
@@ -91,7 +90,6 @@ function populate_indexes($table, $max)
|
||||
$data['body'][] = [
|
||||
'index' => [
|
||||
'_index' => 'predb',
|
||||
'_type' => 'predb',
|
||||
'_id' => $row->id,
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user