Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
검색 기능 추가
Browse files Browse the repository at this point in the history
대소문자 구분 X
  • Loading branch information
ori0o0p committed Feb 13, 2024
1 parent 7d765fc commit 57a13bc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.example.daemawiki.domain.document.repository;

import com.example.daemawiki.domain.document.model.DefaultDocument;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface DocumentRepository extends ReactiveMongoRepository<DefaultDocument, String> {
Mono<DefaultDocument> findByTitle(String title);

Flux<DefaultDocument> findAllByGroupsContains(String group);
@Query("{'$or':[{'title':{$regex:'?0', $options:'i'}}, {'content':{$regex:'?0', $options:'i'}}]}")
Flux<DefaultDocument> findByTextContaining(String text);

}

0 comments on commit 57a13bc

Please sign in to comment.