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

[#50] 검색 API 구체화 #3 #53

Merged
merged 1 commit into from
Oct 12, 2020
Merged

[#50] 검색 API 구체화 #3 #53

merged 1 commit into from
Oct 12, 2020

Conversation

zoripong
Copy link
Member

  • 검색어가 단어의 의미에 포함되는 경우 리턴해줍니다.
  • 여러 조건에 모두 포함되는 경우 중복 제거 해줍니다.
    • 이 때 더 높은 우선순위의 필터를 남기고 남은 것을 제외시킵니다.

예시

마음

image

애착

image

애착 & 마음

image

추가된 쿼리

SELECT 
  word.id AS word_id, word.target_code AS word_target_code, word.part AS word_part, word.contents AS word_contents, word.pronunciation_id AS word_pronunciation_id, %(param_1)s AS priority 
FROM word 
WHERE word.id IN (
  SELECT include_word_relation.word_id 
  FROM word_relation
  JOIN include_word_relation ON word_relation.id = include_word_relation.id 
  WHERE EXISTS (
    SELECT 1 
    FROM pronunciation 
    WHERE pronunciation.id = include_word_relation.related_pronunciation_id 
    AND pronunciation.pronunciation IN (%(pronunciation_1)s)
  )
)

@zoripong zoripong requested a review from kimdoori October 11, 2020 08:10
@zoripong zoripong self-assigned this Oct 11, 2020
Copy link
Contributor

@kimdoori kimdoori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋아보입니다~~

@zoripong zoripong merged commit fb43f1b into k-roffle:main Oct 12, 2020
@zoripong zoripong deleted the feat/#50 branch October 12, 2020 01:19
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

Successfully merging this pull request may close these issues.

2 participants