Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5주차 - 실습환경 구축하기 #4

Open
clghks opened this issue Oct 17, 2023 · 9 comments
Open

5주차 - 실습환경 구축하기 #4

clghks opened this issue Oct 17, 2023 · 9 comments

Comments

@clghks
Copy link
Collaborator

clghks commented Oct 17, 2023

docker에 elasticsearch 설치

@leebokeum
Copy link

leebokeum commented Oct 17, 2023

  1. elasticsearch:8.10.2 설치
  2. elasticsearch.yml 수정
cluster.name: "docker-cluster"
network.host: 0.0.0.0

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 17-10-2023 12:41:10
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: false

xpack.security.enrollment.enabled: false

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: false
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["9d9ae4a8858c"]

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization"
  1. https://github.com/javacafe-project/movie-finder
  • node 설치 필수
  • vue 프로젝트 실습환경 구성

@leebokeum
Copy link

vue 프로젝트 오류 수정

/router/index.js

import { BootstrapVue, IconsPlugin  } from 'bootstrap-vue';

Vue.use(Router)
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)

@leebokeum
Copy link

leebokeum commented Oct 19, 2023

실습중 이슈 가이드 드립니다.

  1. vue 프로젝트를 띄우시면 상단 헤더의 manager 메뉴에서 index를 만들 수 있지만 UI에서 하지 마시고 직접 api로 만드세요.
    (은전한입 플러그인 기반으로 index setting 되도록 하드코딩 되어 있음. 우리는 nori로 실습 할 것임)
{
    "settings": {
        "index": {
            "analysis": {
                "nori_token_analyzer": {
                    "type": "custom",
                    "tokenizer": "nori_user_dict_tokenizer"
                }
            }
        }
    },

    "mappings": {
      "properties" : {
        "movieCd" : {"type" : "integer"},
        "movieNm" : {"type":"text"},
        "movieNmEn": {"type":"text"},
        "prdtYear" : {"type":"integer"},
        "repNationNm" : {"type" : "keyword"},
        "regGenreNm" : {"type" : "keyword"}
      }
  }
}
  1. 상단 헤더 importData 메뉴를 통해 movie, movie_autocomplete index에 데이터를 bulk insert 할 수 있습니다. 그런데 오류가 발생할것입니다. vue 프로젝트에서 아래와 같이 수정하세요. 수정 후 UI에서 movie, movie_autocomplete 버튼을 누르시면 데이터가 import 됩니다.
  • api/bulk.js
// as_is
      index : {
        _index : indexName,
        _type : typeName
      }

// to_be
      index : {
        _index : indexName
      }

@leebokeum
Copy link

최종적으로 아래와 같이 검색이 되시면 성공입니다.

image

@jerryjungwh
Copy link

image
image

@clghks
Copy link
Collaborator Author

clghks commented Oct 23, 2023

스크린샷 2023-10-23 오후 10 24 06

@KimDoubleB
Copy link

@Ting-Kim
Copy link

image

@62hoon99
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants