-
MySQL에서의 한국어 형태소 분석 및 전문검색 테스트
MySQL에서 형태소 분석 및 전문검색 방법 개요 Elasticsearch를 활용한 검색만을 사용하다가, ES검색을 사용하지 않고 DB로만 사용하고 싶다는 요구가 있어 만들어보게 되었다. 먼저, InnoDB에서 지원하는 FTS를 사용하여 ngram을 추가하고, 검색결과 고도화를 위해 MeCab을 이용하여 형태소 분석을 진행하였다. 1. MySQL FullText Search MySQL 내 MyISAM은 MySQL5.5버전 이상부터 지원하고, InnoDB는 MySQL 5.6버전부터 FTS(FullText Search)를 지원한다. CJK(중국어, 일본어, 한국어)를 지원한다. 기본적인 In... Read More
-
MySQL에 MeCab, 은전한닢 설치
MySQL에 MeCab, 은전한닢 설치 개요 도커로 centos7을 띄어 설치하고 테스트해보았지만, 설치해야 되는 리스트가 많아 별도로 쓰게 되었다. 1. 서버제원 Docker image $ docker pull centos:centos7.9.2009 $ docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 centos:centos7.9.2009 OS 정보 [root@3ae62c03f268 ~]# grep . /etc/os-release NAME="CentOS Linux" VERSION="... Read More
-
Elasticsearch 종료
개요 엘라스틱 종료 시 보편적으로 Kill 명령어를 사용함. 하지만 강제 종료로 인해 미처리된 리소스 종료와 클러스터 정리 등 작업들을 정상적으로 완료하지 못함. 시그널을 추가한 종료 $ Kill SIGTERM ${PID} 위 시그널을 추가하게 되면 정상적인 엘라스틱서치 종료가 가능함. 치명적인 오류로 인한 중단 Elasticsearch에서 치명적인 오류 감지 시 자동으로 중지함. 해당 경우 아래 특수 코드를 함께 반환함. 에러코드 설명 ... Read More
-
Elasticsearch Reindex 방법
ReIndex 개요 인덱스를 복제할 수 있는 방법이다. 대량의 문서를 재색인해야 하는 경우 혹은, 데이터 복제본을 이용한 무언가의 작업이 필요한 경우 데이터를 복제할 수 있는 기능이다. 데이터 이관 방법에 대한 협의 이전 데이터를 마이그래이션하는 과정에서 데이터를 어떤 방식으로 이관할지에 대한 논의가 나왔다. 스냅샷을 이용한 데이터 이관 Reindex를 이용한 데이터 이관 스냅샷은 우리가 필요로 하는 데이터를 제외하고도 수많은 인덱스가 생성되어 있었고, 신규 엘라스틱에 색인된 데이... Read More
-
Elasticsearch Cluster node 재시작
Elasticsearch Cluster node 재시작 1. 개요 고가용성 및 검색속도 안정화를 위해, 노드 2대에서 6대로 ES서버를 늘려야 되는 상황이 발생했다. 클러스터의 노드를 증설 시 순서를 적어놓는다. ES의 설정 변경/ 서버 가감 등, 관리자의 의도된 서버 재시작에 대한 작업은 Rolling Restart의 방법을 사용하는 것이 좋다. 2. Rolling Restart 순서 ReBalancing Disable PUT _cluster/settings { "transient": { "cluster.routing.allocati... Read More
-
ElasticSearch OLD GC로 인한 OOM 발생이슈
ElasticSearch OLD GC로 인한 OOM 발생이슈 10,000여건 되는 데이터를 색인하던 중 ES의 클러스터에서 힙메모리가 급작스럽에 풀을 쳤다. GC 로그를 확인해보니 OLD GC가 초당 5번정도 일어나고 있었다. 운영이 시작된 시점에서 Aggregation의 호출이 많아 생기는 문제로 생각되어 GC를 수정하는 방향을 생각했다. 사용하는 GC는 CMS GC를 사용하고 있었으며, G1GC를 통해 OLD GC를 줄이는 방식을 생각했다. 하지만 GC의 문제는 아니었고, 이용자가 없는 새벽 시간에도 GC는 짧은 간격으로 돌고 있었다. 데이터를 전체적으로 다시 색인하면서 시간 체크를 통해 데이터 상 문제가... Read More
-
Elasticsearch Cluster node 증설
Elasticsearch Cluster node 증설 1. 개요 고가용성 및 검색속도 안정화를 위해, 노드 2대에서 6대로 ES서버를 늘려야 되는 상황이 발생했다. 클러스터의 노드를 증설 시 ES 설정 2. 서버 증설을 위한 ES 설정 ES 클러스터를 위한 기본설정 cluster.name: cluster_test node.name: node1 network.host: 111.0.111.111 discovery.seed_hosts: [""] cluster.initial_master_nodes: ["node1"] cluster.name ... Read More
-
Welcome to Jekyll!
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated. To add new posts, simply add a file in the _posts dire... Read More
-
An exhibit of Markdown
This note demonstrates some of what Markdown is capable of doing. An exhibit of Markdown Note: Feel free to play with this page. Unlike regular notes, this doesn’t automatically save itself. Basic formatting Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no... Read More
-
Mathjax Test
A safe integer is an integer that can be exactly represented as an IEEE-754 double precision number, and whose IEEE-75 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation For example, $ 2 ^ {53} - 1 $ is a safe integer, it can be exactly represented . ... Read More
-
Video example
Canon in D (Pachelbel’s Canon) - Cello & Piano [BEST WEDDING VERSION] Some of you know that we occasionally play for weddings. As you can imagine, we get a LOT of requests for Canon in D, and we discovered that there were no good arrangements available anywhere for piano and cello! Hard to believe given its popularity. So we decided to make ... Read More
-
Table example
Table example as below For now, these extended features are provided: Cells spanning multiple columns Cells spanning multiple rows Cells text align separately Table header not required Grouped table header rows or data rows Rowspan and Colspan ^^ in a cell indicates it should be merged with the cell above. This feature is contribu... Read More
-
Mermaid example
1. Pie chart pie title Pets adopted by volunteers "Dogs" : 386 "Cats" : 85 "Rats" : 35 2. sequence diagram @startmermaid sequenceDiagram Alice -» Bob: Hello Bob, how are you? Bob–»John: How about you John? Bob–x Alice: I am good thanks! Bob-x John: I am good thanks! Note right of John: Bob thinks a longlong time, so longthat ... Read More
-
Plantuml example
My First PlantUML PlantUML Block-1 @startuml Bob -> Alice : hello @enduml PlantUML Block-2 Bob -> Alice : hello world PlantUML Block-3 @startuml (*) –> “Initialization” if “Some Test” then –>[true] “Some Activity” –> “Another activity” -right-> () else ->[false] “Something else” –>[Ending process] () endif ... Read More
-
Quick markdown example
Paragraphs are separated by a blank line. 2nd paragraph. Italic, bold, and monospace. Itemized lists look like: this one that one the other one Note that — not considering the asterisk — the actual text content starts at 4-columns in. Block quotes are written like so. They can span multiple paragraphs, if you like. Use 3 dash... Read More
-
This post demonstrates post content styles
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Some great heading (h2) Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, m... Read More
-
Some articles are just so long they deserve a really long title to see if things will break well
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lo... Read More
-
Some articles are just so short that we have to make the footer stick
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur s... Read More
-
Another test markdown
Put the math expression within $…$: \(\LaTeX{}\) $\Pi$ $ a * b = c ^ b $ $ 2^{\frac{n-1}{3}} $ $ \int_a^b f(x)\,dx. $ \( \int_a^b f(x)\,dx. \) \[\begin{cases} \text{if true}\ foo \\ \text{if false}\ bar \end{cases}\] $ \rho {\rm{FOD}} = \sum\limits{\sigma ,i} {(\delta _1 - \delta _2 n_i^\sigma ) \phi _i^\sigma ({\bf{... Read More
-
Test markdown
You can write regular markdown here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to take 5 minutes to learn how to write in markdown - it’ll teach you how to transform regular text into bold/italics/headings/tables/etc. Here is some bold text Here is a secondary heading Here’s a useless table: ... Read More