-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup : 실제 사용할 수 있는 설정용 파일 docs : 보관용 파일 , 문서
- Loading branch information
Showing
35 changed files
with
143 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:8.16.0 | ||
|
||
RUN elasticsearch-plugin install --batch analysis-nori |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"settings": { | ||
"number_of_shards": 1, | ||
"number_of_replicas": 0, | ||
"analysis": { | ||
"filter": { | ||
"synonym_filter": { | ||
"type": "synonym", | ||
"synonyms_path": "synonyms.txt" | ||
}, | ||
"suggest_filter": { | ||
"type": "edge_ngram", | ||
"min_gram": 1, | ||
"max_gram": 50 | ||
} | ||
}, | ||
"analyzer": { | ||
"nori_with_synonym": { | ||
"type": "custom", | ||
"tokenizer": "nori_tokenizer", | ||
"filter": ["lowercase", "nori_readingform", "synonym_filter"] | ||
}, | ||
"suggest_index_analyzer": { | ||
"type": "custom", | ||
"tokenizer": "standard", | ||
"filter": ["lowercase", "suggest_filter"] | ||
}, | ||
"suggest_search_analyzer": { | ||
"type": "custom", | ||
"tokenizer": "standard", | ||
"filter": ["lowercase"] | ||
} | ||
} | ||
} | ||
}, | ||
"mappings": { | ||
"properties": { | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"googlePlaceId": { | ||
"type": "keyword" | ||
}, | ||
"name": { | ||
"type": "text", | ||
"fields": { | ||
"keyword": { | ||
"type": "keyword" | ||
}, | ||
"suggest": { | ||
"type": "completion", | ||
"analyzer": "suggest_index_analyzer", | ||
"search_analyzer": "suggest_search_analyzer" | ||
} | ||
}, | ||
"analyzer": "nori_with_synonym" | ||
}, | ||
"thumbnailUrl": { | ||
"type": "text", | ||
"index": false | ||
}, | ||
"rating": { | ||
"type": "scaled_float", | ||
"scaling_factor": 100 | ||
}, | ||
"location": { | ||
"type": "geo_point" | ||
}, | ||
"formattedAddress": { | ||
"type": "text", | ||
"fields": { | ||
"suggest": { | ||
"type": "completion", | ||
"analyzer": "suggest_index_analyzer", | ||
"search_analyzer": "suggest_search_analyzer" | ||
} | ||
}, | ||
"analyzer": "nori_with_synonym" | ||
}, | ||
"category": { | ||
"type": "keyword", | ||
"index": true | ||
}, | ||
"description": { | ||
"type": "text" | ||
}, | ||
"detailPageUrl": { | ||
"type": "text", | ||
"index": false | ||
}, | ||
"createdAt": { | ||
"type": "date", | ||
"format": "strict_date_optional_time||epoch_millis" | ||
}, | ||
"updatedAt": { | ||
"type": "date", | ||
"format": "strict_date_optional_time||epoch_millis" | ||
}, | ||
"deletedAt": { | ||
"type": "date", | ||
"format": "strict_date_optional_time||epoch_millis", | ||
"null_value": null | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
서울특별시, 서울, 서울시 | ||
부산광역시, 부산, 부산시 | ||
대구광역시, 대구, 대구시 | ||
인천광역시, 인천, 인천시 | ||
광주광역시, 광주, 광주시 | ||
대전광역시, 대전, 대전시 | ||
울산광역시, 울산, 울산시 | ||
세종특별자치시, 세종, 세종시 | ||
경기도, 경기, 경기도청 | ||
강원도, 강원, 강원도청 | ||
충청북도, 충북, 충청북도청 | ||
충청남도, 충남, 충청남도청 | ||
전라북도, 전북, 전북특별자치도, 전라북도청 | ||
전라남도, 전남, 전라남도청 | ||
경상북도, 경북, 경상북도청 | ||
경상남도, 경남, 경상남도청 | ||
제주특별자치도, 제주, 제주도 |
15 changes: 13 additions & 2 deletions
15
...d/resources/elasticsearch/init-es.prod.sh → .../production/elasticsearch/init-es.prod.sh
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# 현재 스크립트의 디렉터리 가져오기 | ||
SCRIPT_DIR=$(dirname "$(realpath "$0")") | ||
INDEX_FILE="$SCRIPT_DIR/index/place-index.json" | ||
|
||
# Elasticsearch 상태 확인 | ||
until curl -s -XGET "http://localhost:9200/_cluster/health" | grep '"status":"green"' > /dev/null; do | ||
echo "Waiting for Elasticsearch to be ready..." | ||
sleep 5 | ||
done | ||
|
||
echo "Checking if 'place' index exists..." | ||
response=$(curl -s -o /dev/null -w "%{http_code}" -XGET "http://elasticsearch:9200/place" -u "elastic:${ELASTIC_PASSWORD}") | ||
if [ "$response" -eq 404 ]; then | ||
echo "Index 'place' does not exist. Creating it..." | ||
curl -X PUT "http://elasticsearch:9200/place" \ | ||
-H "Content-Type: application/json" \ | ||
-u "elastic:${ELASTIC_PASSWORD}" \ | ||
--data-binary @/usr/share/elasticsearch/place-index.json | ||
--data-binary @"$INDEX_FILE" | ||
echo "'place' index created successfully." | ||
elif [ "$response" -eq 200 ]; then | ||
echo "Index 'place' already exists." | ||
else | ||
echo "Unexpected response while checking for 'place' index: HTTP $response" | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CUSTOM_USERNAME= | ||
ELASTIC_PASSWORD= |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.