띄어쓰기 포함 단어는 라이믹스 쿼리로 매칭시킬 수 없나요?
CMS/프레임워크 | Rhymix 2.0 |
---|---|
개발 언어 | PHP 7.2 |
태그 연관글 작동이 이상해 보여서 살펴보고 있는데 뭔가 이상합니다.
띄어쓰기가 있는 태그의 경우 해당 태그가 포함된 다른글을 쿼리했을때 결과가 없는 것으로 나옵니다.
ex)코로나19 백신
게시판에서 직접 검색을 해보면 url에 "코로나19+백신" 이런식으로 처리하는게 보여지는데요. + 라는 것이 단서가 될수 있을지 모르겠네요.
phpmyadmin 에서 직접 띄어쓰기가 있는 태그를 in 으로 검색하면 정확하게 매칭된 게시글이 나옵니다.
<condition operation="in" column="tag" var="tag_list" pipe="and" />
여기에 문서에 들어간 태그를 모두 확인하게 되어있습니다.
args->tag_list ="'코로나19 백신','코로나','백신'";
이런식으로 들어가는 구조 입니다.
이렇게 애드온에서 쿼리를 하면 매칭되는 항목이 하나도 없다고 나오네요.
띄어쓰기 없이 작성된 경우는 검색되어집니다. 그래서 지금 태그 연관글 애드온에서 같은 태그의 다른 문서 추천은 띄어쓰기가 사용되지 않은 태그와 일치하는 문서들만 추천됩니다.
xml 파일 전체입니다.
<query id="getDocumentListWithinTag" action="select">
<tables>
<table name="tags" />
</tables>
<columns>
<column name="document_srl" />
<column name="module_srl" />
<column name="count(*)" alias="count" />
</columns>
<conditions>
<condition operation="more" column="module_srl" var="module_srl" />
<condition operation="in" column="module_srl" var="module_srls" pipe="and" />
<condition operation="in" column="tag" var="tag_list" pipe="and" />
</conditions>
<groups>
<group column="document_srl" />
<group column="module_srl" />
</groups>
</query>
댓글 1
https://github.com/rhymix/rhymix/issues/1783#issuecomment-911280229