티스토리 뷰
https://www.elastic.co/kr/downloads/elasticsearch
Download Elasticsearch
Download Elasticsearch or the complete Elastic Stack (formerly ELK stack) for free and start searching and analyzing in minutes with Elastic....
www.elastic.co
다운로드, 압축해제, cmd에서 bin의 elasticssearch.bat 실행
- 이거 관리자로 실행하면 문제있어서 그냥 실행함
실행하면 패스워드, 키바나 토큰 등 나옴
토큰이 만료 돼서 다시 발급 진행함
es 서버 켜져 있는 상태에서 cmd > cd bin > elasticsearch-create-enrollment-token -s kibana
- hyper-v 켜져 있으면 다른 아이피로 잡혀서 인증서 관련 에러나서 기능에서 끄고 재부팅 > 다시 시도
https://www.elastic.co/kr/downloads/kibana
Download Kibana Free | Get Started Now
Download Kibana or the complete Elastic Stack (formerly ELK stack) for free and start visualizing, analyzing, and exploring your data with Elastic in minutes....
www.elastic.co
다운로드 > 압축해제 > cmd > cd bin > kibana.bat
http://localhost:5601/ 접속
토큰 넣고 configure elastic 누르면 실행중인 화면에 code 나타남
python으로 고객정보, 상담내역 등 csv로 load하여 index만들어 업로드 완료
nori 형태소 분석기 플러그인 설치 후 재시작
cmd > bin/elasticsearch-plugin install analysis-nori
setting이나 index mapping은 python에서 처리
user = "elastic"
key = "password"
# Elasticsearch 클라이언트 설정
es = Elasticsearch(
["https://localhost:9200"], # HTTPS 프로토콜 사용
basic_auth=(user, key), # 인증 정보가 필요할 경우 추가
verify_certs=False, # 인증서 검증을 생략 (생산 환경에서는 True로 설정)
)
# 고객 정보 매핑
customers_mapping = {
"mappings": {
"properties": {
"주소록구분": {"type": "text", "analyzer": "korean"},
"고객명": {"type": "text", "analyzer": "korean"},
"고객구분": {"type": "text", "analyzer": "korean"},
"상태": {"type": "text", "analyzer": "korean"},
"주소1": {"type": "text", "analyzer": "korean"},
"주소2": {"type": "text", "analyzer": "korean"},
"대리점명": {"type": "text", "analyzer": "korean"},
"담당직원": {"type": "text", "analyzer": "korean"},
"작성자": {"type": "text", "analyzer": "korean"},
"고객설명": {"type": "text", "analyzer": "korean"},
}
}
}
# 상담 정보 매핑
inquiries_mapping = {
"mappings": {
"properties": {
"상담유형": {"type": "text", "analyzer": "korean"},
"상담자": {"type": "text", "analyzer": "korean"},
"고객명": {"type": "text", "analyzer": "korean"},
"상담내용": {"type": "text", "analyzer": "korean"},
"조치사항": {"type": "text", "analyzer": "korean"},
"처리결과": {"type": "text", "analyzer": "korean"},
"처리자": {"type": "text", "analyzer": "korean"},
}
}
}
# 기존 인덱스 삭제 (필요한 경우)
es.indices.delete(index="customers", ignore=[400, 404])
es.indices.delete(index="inquiries", ignore=[400, 404])
# 인덱스 생성 및 매핑 설정
es.indices.create(index="customers", body={**nori_settings, **customers_mapping})
es.indices.create(index="inquiries", body={**nori_settings, **inquiries_mapping})
아직 작성중
이게 csv의 date format이랑 올라갔을때와
그냥 date가 사람 미치게함
'Others > Computer' 카테고리의 다른 글
도커 지웠는데 host.docker.internal가 나올 때 (0) | 2024.02.19 |
---|---|
젠킨스 설치 및 구성 with C++ MFC solution, SVN (0) | 2023.11.28 |
powershell 핑 시간 로그(ping log with timestamp) (0) | 2023.01.26 |
Windows11 "더 많은 옵션" 끄기 (1) | 2021.08.20 |
X570 AORUS ELITE TPM 2.0 켜기(Windows11, 발로란트 뱅가드) (0) | 2021.08.07 |
티스토리 방명록
- Total
- Today
- Yesterday
Contact: j0n9m1n1@gmail.com