CREATE
-
Multiple DocumentsBackEnd/Elasticsearch API 2025. 3. 10. 01:00
_update_by_queryTo update documents in Elasticsearch based on a query, you can use the _update_by_query API.# 모든 Documents를 업데이트 합니다.POST /store/_update_by_query{ "script": { "source": "ctx._source.stock-=1" }}# product가 peach인 Documents만 업데이트 합니다.POST /store/_update_by_query{ "script": { "source": "ctx._source.stock-=1" }, "query": { "term": { "product": "peach" } }} _del..
-
DocumentBackEnd/Elasticsearch API 2025. 3. 9. 10:00
Create# create an indexPUT /my_index{ "settings": { "index": { "number_of_shards": 1, // You can specify the number of shards here "number_of_replicas": 1 // Set to 0 for no replicas } }}# crate a documentPOST /my_index/_doc/100{ "title": "Elasticsearch Advanced", "author": "Anthony K", "publish_date": "2024-05-20", "tags": ["search", "analytics"]} RetrieveGET /my_index/..
-
Sequence 생성 OperatorSpring Reactive Web Application/Project Reactor 2023. 8. 3. 23:00
justOrEmpty justOrEmpty()는 just()의 확장 Operator로서, just() Operator와 달리, emit할 데이터가 null일 경우 NullPointException이 발생하지 않고 onComplete Signal을 전송합니다. emit할 데이터가 null이 아닐 경우 해당 데이터를 emit하는 Mono를 생성합니다. import lombok.extern.slf4j.Slf4j; import reactor.core.publisher.Mono; @Slf4j public class Example14_1 { public static void main(String[] args) { Mono .justOrEmpty(null) .subscribe(data -> {}, error -> {..
-
02. 게시판 (테이블 생성)Spring Web Project/2. 게시판 (Board) 2020. 11. 24. 13:11
00. Select Database > use mysql; 01. Create Table create table tbl_board ( bno INT NOT NULL AUTO_INCREMENT, title VARCHAR(200) NOT NULL, content TEXT NULL, writer VARCHAR(50) NOT NULL, regdate TIMESTAMP NOT NULL DEFAULT now(), viewcnt INT DEFAULT 0, PRIMARY KEY (bno)); 02. Table 생성 확인 select * from tbl_board; 03. Insert data insert into tbl_board(title, content, writer) values ('제목', '내용', 'User..