mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 14:19:59 +00:00
es: fix remaining 7.xisms
the enabled: false apparently only applies to "object" fields now, need index: false and the _type got removed everywhere. Seems to work now.
This commit is contained in:
parent
b797f45f28
commit
093eabf158
|
@ -104,9 +104,11 @@ mappings:
|
|||
analyzer: exact_analyzer
|
||||
created_time:
|
||||
type: date
|
||||
#
|
||||
# Only in the ES index for generating magnet links
|
||||
info_hash:
|
||||
enabled: false
|
||||
type: keyword
|
||||
index: false
|
||||
filesize:
|
||||
type: long
|
||||
anonymous:
|
||||
|
|
|
@ -34,7 +34,6 @@ def pad_bytes(in_bytes, size):
|
|||
def mk_es(t, index_name):
|
||||
return {
|
||||
"_id": t.id,
|
||||
"_type": "torrent",
|
||||
"_index": index_name,
|
||||
"_source": {
|
||||
# we're also indexing the id as a number so you can
|
||||
|
|
|
@ -114,7 +114,6 @@ def reindex_torrent(t, index_name):
|
|||
return {
|
||||
'_op_type': 'update',
|
||||
'_index': index_name,
|
||||
'_type': 'torrent',
|
||||
'_id': str(t['id']),
|
||||
"doc": doc,
|
||||
"doc_as_upsert": True
|
||||
|
@ -128,7 +127,6 @@ def reindex_stats(s, index_name):
|
|||
return {
|
||||
'_op_type': 'update',
|
||||
'_index': index_name,
|
||||
'_type': 'torrent',
|
||||
'_id': str(s['torrent_id']),
|
||||
"doc": {
|
||||
"stats_last_updated": s["last_updated"],
|
||||
|
@ -141,7 +139,6 @@ def delet_this(row, index_name):
|
|||
return {
|
||||
"_op_type": 'delete',
|
||||
'_index': index_name,
|
||||
'_type': 'torrent',
|
||||
'_id': str(row['values']['id'])}
|
||||
|
||||
# we could try to make this script robust to errors from es or mysql, but since
|
||||
|
|
Loading…
Reference in a new issue