mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
added elasticsearch config
This commit is contained in:
parent
248871b42b
commit
a7694d266c
10
.env.dist
10
.env.dist
@ -107,9 +107,19 @@ QUEUE_DELAY_PER_JOB=5
|
||||
###
|
||||
# ElasticSearch Config
|
||||
###
|
||||
# Host -- required
|
||||
# ELASTICSEARCH_HOST=host:port
|
||||
# you can use commas as sperator for additional nodes:
|
||||
# ELASTICSEARCH_HOST=host:port,host:port
|
||||
# username (optional)
|
||||
# ELASTICSEARCH_USER=user
|
||||
# password (optional)
|
||||
# ELASTICSEARCH_PASSWORD=password
|
||||
# api key (optional)
|
||||
# ELASTICSEARCH_API_KEY=apikey
|
||||
# cloud id (optional)
|
||||
# ELASTICSEARCH_CLOUD_ID=cloudid
|
||||
|
||||
|
||||
###
|
||||
# Throttling
|
||||
|
204
config/elasticsearch.php
Normal file
204
config/elasticsearch.php
Normal file
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'host' => env('ELASTICSEARCH_HOST'),
|
||||
'user' => env('ELASTICSEARCH_USER'),
|
||||
'password' => env('ELASTICSEARCH_PASSWORD'),
|
||||
'cloud_id' => env('ELASTICSEARCH_CLOUD_ID'),
|
||||
'api_key' => env('ELASTICSEARCH_API_KEY'),
|
||||
'indices' => [
|
||||
'mappings' => [
|
||||
'default' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'keyword',
|
||||
],
|
||||
'mal_id' => [
|
||||
'type' => 'keyword'
|
||||
]
|
||||
],
|
||||
],
|
||||
'anime_index' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'keyword',
|
||||
],
|
||||
'mal_id' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'start_date' => [
|
||||
'type' => 'date'
|
||||
],
|
||||
'end_date' => [
|
||||
'type' => 'date'
|
||||
],
|
||||
'title' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'title_english' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'title_japanese' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'title_synonyms' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'type' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'source' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'episodes' => [
|
||||
'type' => 'short'
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'airing' => [
|
||||
'type' => 'boolean'
|
||||
],
|
||||
'rating' => [
|
||||
'type' => 'float'
|
||||
],
|
||||
'score' => [
|
||||
'type' => 'float'
|
||||
],
|
||||
'rank' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'popularity' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'members' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'favorites' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'synopsis' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'season' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'year' => [
|
||||
'type' => 'keyword'
|
||||
]
|
||||
]
|
||||
],
|
||||
'manga_index' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'keyword',
|
||||
],
|
||||
'mal_id' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'start_date' => [
|
||||
'type' => 'date'
|
||||
],
|
||||
'end_date' => [
|
||||
'type' => 'date'
|
||||
],
|
||||
'title' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'title_english' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'title_japanese' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'title_synonyms' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'type' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'source' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'chapters' => [
|
||||
'type' => 'short'
|
||||
],
|
||||
'volumes' => [
|
||||
'type' => 'short'
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'publishing' => [
|
||||
'type' => 'boolean'
|
||||
],
|
||||
'rating' => [
|
||||
'type' => 'float'
|
||||
],
|
||||
'score' => [
|
||||
'type' => 'float'
|
||||
],
|
||||
'rank' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'popularity' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'members' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'favorites' => [
|
||||
'type' => 'integer'
|
||||
],
|
||||
'synopsis' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'season' => [
|
||||
'type' => 'keyword'
|
||||
]
|
||||
]
|
||||
],
|
||||
'characters_index' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'keyword',
|
||||
],
|
||||
'mal_id' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'name' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'name_kanji' => [
|
||||
'type' => 'text'
|
||||
]
|
||||
]
|
||||
],
|
||||
'people_index' => [
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'type' => 'keyword',
|
||||
],
|
||||
'mal_id' => [
|
||||
'type' => 'keyword'
|
||||
],
|
||||
'name' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'given_name' => [
|
||||
'type' => 'text'
|
||||
],
|
||||
'family_name' => [
|
||||
'type' => 'text'
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'settings' => [
|
||||
'default' => [
|
||||
'number_of_shards' => 1,
|
||||
'number_of_replicas' => 0,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user