DELETE cine21 PUT /cine21{ "settings": { "analysis": { "analyzer": { "korean_analyzer" : { "type" : "custom", "tokenizer": "korean_tokenizer", "filter" : ["stop", "lowercase", "trim", "synonym"] }, "ngram_analyzer" : { "type" : "custom", "tokenizer" : "ngram_tokenizer", "filter" : ["lowercase", "trim","synonym"] }, "edge_ngram_analyzer" : { "type" : "custom", "tokenizer" : "edge_ngram_tokenizer"..
curl -XGET 'http://localhost:9200/cine21/_analyze?analyzer=korean_analyzer&pretty=true' -d '멀티플레이어를 자처'curl -XGET 'http://localhost:9200/cine21/_analyze?analyzer=ngram_analyzer&pretty=true' -d '멀티플레이어를 자처'curl -XGET 'http://localhost:9200/cine21/_analyze?analyzer=edge_ngram_analyzer&pretty=true' -d '멀티플레이어를 자처'
DELETE cine21 PUT /cine21{ "settings": { "analysis": { "analyzer": { "korean_analyzer" : { "type" : "custom", "tokenizer": "korean_tokenizer", "filter" : ["stop", "lowercase", "trim"] }, "ngram_analyzer" : { "type" : "custom", "tokenizer" : "ngram_tokenizer", "filter" : ["lowercase", "trim"] }, "edge_ngram_analyzer" : { "type" : "custom", "tokenizer" : "edge_ngram_tokenizer", "filter" : ["lowerc..
보호되어 있는 글입니다.
8. 매핑8.1 매핑(_mapping) API예제 8.1 books 인덱스의 매핑 확인curl 'http://localhost:9200/books/_mapping?pretty' 예제 8.2 books/book 인덱스/타입에 read 필드 추가curl -XPUT 'http://localhost:9200/books/_mapping/book' -d ' { "book" : { "properties" : { "read" : { "type" : "boolean" } } } }' 예제 8.3 read 필드 추가 후 books 인덱스의 매핑 확인curl 'http://localhost:9200/books/_mapping?pretty' 8.2 내장필드예제 8.4 인덱스 생성 시 내장필드 설정PUT / -d ' { "ma..
7. 질의(QueryDSL)7.1 쿼리7.1.1 텀, 텀즈 쿼리예제 7.1 title 필드 값이 prince인 도큐먼트를 텀 쿼리로 검색curl 'localhost:9200/books/_search?pretty' -d ' { "query" : { "term" : { "title" : "prince" } } }' 예제 7.2 Prince로 검색하면 저장된 텀과 다르므로 결과에 나타나지 않음curl 'localhost:9200/books/_search?pretty' -d ' { "query" : { "term" : { "title" : "Prince" } } }' 예제 7.3 텀즈 쿼리를 이용해서 prince, king 텀 검색curl 'localhost:9200/books/_search?pretty' -d..
6.1 페이셋예제 6.1 hotels 인덱스 매핑 설정curl -XPUT http://localhost:9200/hotels/ -d ' { "mappings" : { "hotel" : { "properties" : { "name" : { "type" : "string" }, "stars" : { "type" : "long" }, "rooms" : { "type" : "long" }, "location" : { "type" : "geo_point" }, "city" : { "type" : "string" }, "address" : { "type" : "string" }, "internet" : { "type" : "boolean" }, "service" : { "type" : "string", "index..
5. 검색예제 5.1 5_1_books.json 파일 내용을 벌크 API로 입력curl -XPOST localhost:9200/_bulk --data-binary @5_1_books.json curl -XPOST localhost:9200/_bulk --data-binary @5_2_magazines.json 5.1 검색(_search) API예제 5.2 books 인덱스, book 타입에서 hamlet 검색curl 'localhost:9200/books/book/_search?q=hamlet&pretty' 예제 5.3 books 인덱스에서 hamlet 검색curl 'localhost:9200/books/_search?q=hamlet&pretty' 예제 5.4 books, magazines 인덱스에서 t..