mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 19:49:59 +00:00
es_mapping.yml: fix deprecated mapping type
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html#_schedule_for_removal_of_mapping_types it gives a really unhelpful error otherwise, oof.
This commit is contained in:
parent
1ba82f3fa8
commit
b797f45f28
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
# create indices named "nyaa" and "sukebei", these are hardcoded
|
# create indices named "nyaa" and "sukebei", these are hardcoded
|
||||||
curl -v -XPUT 'localhost:9200/nyaa?pretty' -H"Content-Type: application/yaml" --data-binary @es_mapping.yml
|
curl -v -XPUT 'localhost:9200/nyaa?pretty' -H"Content-Type: application/yaml" --data-binary @es_mapping.yml
|
||||||
|
|
111
es_mapping.yml
111
es_mapping.yml
|
@ -83,59 +83,58 @@ settings:
|
||||||
mappings:
|
mappings:
|
||||||
# disable elasticsearch's "helpful" autoschema
|
# disable elasticsearch's "helpful" autoschema
|
||||||
dynamic: false
|
dynamic: false
|
||||||
torrent:
|
properties:
|
||||||
properties:
|
id:
|
||||||
id:
|
type: long
|
||||||
type: long
|
display_name:
|
||||||
display_name:
|
# TODO could do a fancier tokenizer here to parse out the
|
||||||
# TODO could do a fancier tokenizer here to parse out the
|
# the scene convention of stuff in brackets, plus stuff like k-on
|
||||||
# the scene convention of stuff in brackets, plus stuff like k-on
|
type: text
|
||||||
type: text
|
analyzer: my_index_analyzer
|
||||||
analyzer: my_index_analyzer
|
fielddata: true # Is this required?
|
||||||
fielddata: true # Is this required?
|
fields:
|
||||||
fields:
|
# Multi-field for full-word matching (when going over ngram limits)
|
||||||
# Multi-field for full-word matching (when going over ngram limits)
|
# Note: will have to be queried for, not automatic
|
||||||
# Note: will have to be queried for, not automatic
|
fullword:
|
||||||
fullword:
|
type: text
|
||||||
type: text
|
analyzer: my_fullword_index_analyzer
|
||||||
analyzer: my_fullword_index_analyzer
|
# Stored for exact phrase matching
|
||||||
# Stored for exact phrase matching
|
exact:
|
||||||
exact:
|
type: text
|
||||||
type: text
|
analyzer: exact_analyzer
|
||||||
analyzer: exact_analyzer
|
created_time:
|
||||||
created_time:
|
type: date
|
||||||
type: date
|
# Only in the ES index for generating magnet links
|
||||||
# Only in the ES index for generating magnet links
|
info_hash:
|
||||||
info_hash:
|
enabled: false
|
||||||
enabled: false
|
filesize:
|
||||||
filesize:
|
type: long
|
||||||
type: long
|
anonymous:
|
||||||
anonymous:
|
type: boolean
|
||||||
type: boolean
|
trusted:
|
||||||
trusted:
|
type: boolean
|
||||||
type: boolean
|
remake:
|
||||||
remake:
|
type: boolean
|
||||||
type: boolean
|
complete:
|
||||||
complete:
|
type: boolean
|
||||||
type: boolean
|
hidden:
|
||||||
hidden:
|
type: boolean
|
||||||
type: boolean
|
deleted:
|
||||||
deleted:
|
type: boolean
|
||||||
type: boolean
|
has_torrent:
|
||||||
has_torrent:
|
type: boolean
|
||||||
type: boolean
|
download_count:
|
||||||
download_count:
|
type: long
|
||||||
type: long
|
leech_count:
|
||||||
leech_count:
|
type: long
|
||||||
type: long
|
seed_count:
|
||||||
seed_count:
|
type: long
|
||||||
type: long
|
comment_count:
|
||||||
comment_count:
|
type: long
|
||||||
type: long
|
# these ids are really only for filtering, thus keyword
|
||||||
# these ids are really only for filtering, thus keyword
|
uploader_id:
|
||||||
uploader_id:
|
type: keyword
|
||||||
type: keyword
|
main_category_id:
|
||||||
main_category_id:
|
type: keyword
|
||||||
type: keyword
|
sub_category_id:
|
||||||
sub_category_id:
|
type: keyword
|
||||||
type: keyword
|
|
||||||
|
|
Loading…
Reference in a new issue