diff --git a/es_mapping.yml b/es_mapping.yml index 99c6a86..d1939d2 100644 --- a/es_mapping.yml +++ b/es_mapping.yml @@ -104,9 +104,11 @@ mappings: analyzer: exact_analyzer created_time: type: date - # Only in the ES index for generating magnet links + # + # Only in the ES index for generating magnet links info_hash: - enabled: false + type: keyword + index: false filesize: type: long anonymous: diff --git a/import_to_es.py b/import_to_es.py index c244abb..6717100 100755 --- a/import_to_es.py +++ b/import_to_es.py @@ -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 diff --git a/sync_es.py b/sync_es.py index 382c744..aa1adcb 100755 --- a/sync_es.py +++ b/sync_es.py @@ -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