카테고리 없음

mac / elasticsearch autocomplete 설정기 (3)

두라미 2024. 3. 15. 19:00

mac에 stack 다 설치하는 것보다 그냥 docker로 exec해서 설정하는게 더 편하더라. 

 

;;

창피해 ,, 넘어가줘요

 

 

기냥 새로 도커로 진행중.

 

curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD -X GET https://localhost:9200/hanja-20240411-1/_search

 

curl로도 되는데, postman에서는 import할 수 있더라. 

https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-curl-commands

문서있으니 참고해보시라.

 

{
    "took": 8,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 10000,
            "relation": "gte"
        },
        "max_score": 1.0,
        "hits": [
            {
                "_index": "hanja-20240411-1",
                "_id": "4k-Cy44B-8hUeFLqLMCd",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "거짓",
                    "key": "仮",
                    "id": "d56daa86-6c9d-4bb0-b635-73433d94f1fc"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "40-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "반",
                    "def": "돌이킬",
                    "key": "仮",
                    "id": "8da63ecb-0167-4b00-ab94-71581ab280a2"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "5E-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "절",
                    "key": "伽",
                    "id": "00d2bd74-aaab-4e47-a2f7-31306e2de9b1"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "5U-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "아름다울",
                    "key": "佳",
                    "id": "fb4f3e5c-cbc9-47e8-b7fe-9991dfb6e322"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "5k-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "개",
                    "def": "착할",
                    "key": "佳",
                    "id": "e63443b6-bd2a-4a18-85cf-46f344715462"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "50-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "값",
                    "key": "価",
                    "id": "26474519-a26d-49e8-8740-6818ba4cdffa"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "6E-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "거짓",
                    "key": "假",
                    "id": "b81b4ae2-aa72-461b-8f37-d9c8471bb28f"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "6U-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "하",
                    "def": "거짓",
                    "key": "假",
                    "id": "d2c634d2-5b8e-4236-bc17-45df2f1b7714"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "6k-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "세간",
                    "key": "傢",
                    "id": "e8f44eb2-11f9-43c2-b154-0d6affa63226"
                }
            },
            {
                "_index": "hanja-20240411-1",
                "_id": "60-Cy44B-8hUeFLqLMCe",
                "_score": 1.0,
                "_source": {
                    "kor": "가",
                    "def": "값",
                    "key": "價",
                    "id": "39367e29-21ef-4aae-8952-cc5d51cc697c"
                }
            }
        ]
    }
}

예시