Revert "Add playbook to download /build latest nyaa, fix k-on elasticsearch issue (#821)"
This reverts commit da1e323825
.
Cette révision appartient à :
Parent
da1e323825
révision
5bcda5c9a1
5 fichiers modifiés avec 10 ajouts et 58 suppressions
|
@ -10,7 +10,7 @@ var DefaultSearchConfig = SearchConfig{}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultElasticsearchAnalyzer : default analyzer for ES
|
// DefaultElasticsearchAnalyzer : default analyzer for ES
|
||||||
DefaultElasticsearchAnalyzer = "nyaapantsu_search_analyzer"
|
DefaultElasticsearchAnalyzer = "nyaapantsu_analyzer"
|
||||||
// DefaultElasticsearchIndex : default search index for ES
|
// DefaultElasticsearchIndex : default search index for ES
|
||||||
DefaultElasticsearchIndex = "nyaapantsu"
|
DefaultElasticsearchIndex = "nyaapantsu"
|
||||||
// DefaultElasticsearchType : Name of the type in the es mapping
|
// DefaultElasticsearchType : Name of the type in the es mapping
|
||||||
|
|
|
@ -5,5 +5,4 @@ nyaapantsu_pgpool_port: 9998
|
||||||
nyaapantsu_directory: /nyaapantsu/
|
nyaapantsu_directory: /nyaapantsu/
|
||||||
nyaapantsu_gpg_passphrase_file: "{{ nyaapantsu_directory }}/passphrase"
|
nyaapantsu_gpg_passphrase_file: "{{ nyaapantsu_directory }}/passphrase"
|
||||||
nyaapantsu_elasticsearch_index: nyaapantsu
|
nyaapantsu_elasticsearch_index: nyaapantsu
|
||||||
nyaapantsu_build_directory: go_nyaa/
|
|
||||||
# vim: ft=yaml
|
# vim: ft=yaml
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# Should only be used for the dev machine until we get a nice setup to install
|
|
||||||
# both sukebei AND nyaa.
|
|
||||||
- name: Install nyaa
|
|
||||||
hosts: webservers
|
|
||||||
roles:
|
|
||||||
- nyaapantsu
|
|
||||||
|
|
|
@ -2,41 +2,19 @@
|
||||||
settings:
|
settings:
|
||||||
analysis:
|
analysis:
|
||||||
analyzer:
|
analyzer:
|
||||||
nyaapantsu_search_analyzer:
|
nyaapantsu_analyzer:
|
||||||
type: custom
|
tokenizer: nyaapantsu_tokenizer
|
||||||
tokenizer: standard
|
|
||||||
char_filter:
|
|
||||||
- my_char_filter
|
|
||||||
filter:
|
filter:
|
||||||
- standard
|
- standard
|
||||||
- lowercase
|
- lowercase
|
||||||
nyaapantsu_index_analyzer:
|
tokenizer:
|
||||||
type: custom
|
nyaapantsu_tokenizer:
|
||||||
tokenizer: standard
|
type: edge_ngram
|
||||||
char_filter:
|
|
||||||
- my_char_filter
|
|
||||||
filter:
|
|
||||||
- resolution
|
|
||||||
- lowercase
|
|
||||||
- my_ngram
|
|
||||||
- word_delimit
|
|
||||||
filter:
|
|
||||||
my_ngram:
|
|
||||||
type: edgeNGram
|
|
||||||
min_gram: 2
|
min_gram: 2
|
||||||
max_gram: 15
|
max_gram: 15
|
||||||
resolution:
|
token_chars:
|
||||||
type: pattern_capture
|
- letter
|
||||||
patterns: ["(\\d+)[xX](\\d+)"]
|
- digit
|
||||||
word_delimit:
|
|
||||||
type: word_delimiter
|
|
||||||
preserve_original: true
|
|
||||||
split_on_numerics: false
|
|
||||||
char_filter:
|
|
||||||
my_char_filter:
|
|
||||||
type: mapping
|
|
||||||
mappings: ["-=>_", "!=>_", "_=>\\u0020"]
|
|
||||||
|
|
||||||
index:
|
index:
|
||||||
number_of_shards: 1
|
number_of_shards: 1
|
||||||
number_of_replicas: 0
|
number_of_replicas: 0
|
||||||
|
@ -49,7 +27,7 @@ mappings:
|
||||||
type: long
|
type: long
|
||||||
name:
|
name:
|
||||||
type: text
|
type: text
|
||||||
analyzer: nyaapantsu_index_analyzer
|
analyzer: nyaapantsu_analyzer
|
||||||
fielddata: true # Use to sort by id because it is currently a text field
|
fielddata: true # Use to sort by id because it is currently a text field
|
||||||
category:
|
category:
|
||||||
type: text
|
type: text
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
- name: Make directory
|
|
||||||
file:
|
|
||||||
state: directory
|
|
||||||
path: "{{ nyaapantsu_build_directory }}/src/github.com/NyaaPantsu"
|
|
||||||
|
|
||||||
# TODO ability to get specify commit
|
|
||||||
- name: Get latest nyaa
|
|
||||||
git:
|
|
||||||
repo: 'https://github.com/NyaaPantsu/nyaa'
|
|
||||||
dest: "{{ nyaapantsu_build_directory }}/src/github.com/NyaaPantsu/nyaa"
|
|
||||||
|
|
||||||
# Assumes the GOPATH variable has been set
|
|
||||||
- name: Go build
|
|
||||||
shell: go build
|
|
||||||
args:
|
|
||||||
chdir: "{{ nyaapantsu_build_directory }}/src/github.com/NyaaPantsu/nyaa"
|
|
||||||
environment:
|
|
||||||
GOPATH: "/home/{{ ansible_ssh_user }}/{{ nyaapantsu_build_directory }}"
|
|
Référencer dans un nouveau ticket