이 플러그인은 다음과 같은 기능을 제공합니다.
MySQL 또는 MariadB를 사용하는 경우 Mroonga 9.03 이상이 필요합니다.
PostgreSQL을 사용하는 경우 PGROONGA 2.2.0 이상이 필요합니다.
Mroonga와 Pgroonga는 Groonga를 전체 텍스트 검색 엔진으로 사용합니다. Groonga 9.0.3 이상이 필요합니다.
pgroonga 문서를 참조하십시오
Mroonga 문서를 참조하십시오
Chupatext를 설치하려면 그 중 하나를 선택할 수 있습니다.
Chupa-Text-Docker가 권장됩니다. Chupa-Text-Docker를 설치하려면 Chupa-Text-Docker 문서를 참조하십시오.
Chupa-Text-Vagrant를 설치하려면 Chupa-Text-Vagrant 문서를 참조하십시오.
Chupa-Text-HTTP-Server는 Redmine 자체와 같은 일반 Ruby on Rails 응용 프로그램입니다. Chupa-Text-HTTP-Server를 일반 Ruby on Rails 응용 프로그램으로 배포 할 수 있습니다.
$ cd redmine
$ git clone https://github.com/clear-code/redmine_full_text_search.git plugins/full_text_search
$ bundle install
$ RAILS_ENV=production bin/rails redmine:plugins:migrateRedmine을 다시 시작하십시오.
pgroonga의 참고 :
Redmine에 일반 사용자를 사용하는 경우. 실행하기 전에 다음 쿼리를 슈퍼 사용자로 실행해야합니다 RAILS_ENV=production bin/rails redmine:plugins:migrate
CREATE EXTENSION IF NOT EXISTS pgroonga; https : // your_redmine_server/settings/plugin/full_text_search를 열고 페이지에서 항목을 구성합니다. Chupatext 서버를 설치하면 "Chupatext Server URL"을 구성해야합니다. 동일한 호스트에서 Chupa-Text-Docker 또는 Chupa-Text-Vagrant로 Chupatext 서버를 설치하면 http://127.0.0.1:20080/extraction.json 입니다.
기존 데이터에 대한 인덱스를 만들어야합니다. 대상 데이터를 더 이상 동기화하지 않을 때까지 full_text_search:synchronize 실행해야합니다.
$ cd redmine
$ RAILS_ENV=production bin/rails full_text_search:synchronize
$ RAILS_ENV=production bin/rails full_text_search:synchronize
$ RAILS_ENV=production bin/rails full_text_search:synchronize
...이 플러그인은 쿼리 확장을 지원합니다. 이 기능을 사용하여 동의어 검색을 구현할 수 있습니다.
관리 페이지 또는 데이터 파일에서 Web UI로 쿼리 확장 목록을 관리 할 수 있습니다.
데이터 파일에는 다음 형식을 사용할 수 있습니다.
CSV를 사용하는 경우 다음 형식을 사용하십시오.
SOURCE1,DESTINATION1
SOURCE2,DESTINATION2
...
예:
MySQL,MySQL
MySQL,MariaDB
MariaDB,MySQL
MariaDB,MariaDB
JSON을 사용하는 경우 다음 형식 중 하나를 사용하십시오.
[
[ " SOURCE1 " , " DESTINATION1 " ],
[ " SOURCE2 " , " DESTINATION2 " ],
...
][
{ "source" : " SOURCE1 " , "destination" : " DESTINATION1 " },
{ "source" : " SOURCE2 " , "destination" : " DESTINATION2 " },
...
]예 :
[
[ " MySQL " , " MySQL " ],
[ " MySQL " , " MariaDB " ],
[ " MariaDB " , " MySQL " ],
[ " MariaDB " , " MariaDB " ]
][
{ "source" : " MySQL " , "destination" : " MySQL " },
{ "source" : " MySQL " , "destination" : " MariaDB " },
{ "source" : " MariaDB " , "destination" : " MySQL " },
{ "source" : " MariaDB " , "destination" : " MariaDB " }
]다음 명령으로 쿼리 확장 목록을 데이터 파일과 동기화 할 수 있습니다.
$ cd redmine
$ RAILS_ENV=production bin/rails full_text_search:query_expansion:synchronize INPUT=query-expansion.csv관리 페이지에서 현재 쿼리 확장 목록을 확인할 수 있습니다.
Mroonga는 충돌 안전하지 않습니다. Mroonga에서 데이터를 업데이트하는 동안 MySQL이 충돌하면 Mroonga 데이터가 깨질 수 있습니다.
깨진 mroonga 데이터에서 복구하는 지침은 다음과 같습니다.
Redmine 플러그인 지연 작업을 사용하는 경우이 플러그인의 작업자를 중지하고 작업을 삭제해야합니다.
$ sudo -H systemctl stop [email protected]
$ cd redmine
$ RAILS_ENV=production bin/rails runner ' Delayed::Job.where(queue: "full_text_search").delete_all 'MySQL 중지 :
$ sudo -H systemctl stop mysqldmroonga 관련 파일 제거 :
$ cd redmine
$ database_name= $( RAILS_ENV=production bin/rails runner ' puts ActiveRecord::Base.configurations[Rails.env]["database"] ' )
$ sudo -H sh -c " rm -rf /var/lib/mysql/ ${database_name} .mrn* "MySQL 시작 :
$ sudo -H systemctl start mysqldMroonga 매뉴얼에 따라 Mroonga가 올바르게 설치되었는지 확인하십시오. Mroonga가 설치되지 않은 경우 다음과 같이 Mroonga를 설치하십시오.
$ mysql -u root -p < /usr/share/mroonga/install.sql이 플러그인을 위해 명시 적으로 파괴 테이블 :
$ mysql -u root -p ${database_name}
> DROP TABLE IF EXISTS fts_query_expansions ;
> DROP TABLE IF EXISTS fts_targets ;
> DROP TABLE IF EXISTS fts_tags ;
> DROP TABLE IF EXISTS fts_tag_types ;
> DROP TABLE IF EXISTS fts_types ;이 플러그인의 스키마 재현 :
$ cd redmine
$ RAILS_ENV=production bin/rails redmine:plugins:migrate NAME=full_text_search VERSION=0
$ RAILS_ENV=production bin/rails redmine:plugins:migrate NAME=full_text_searchRedmine 플러그인 지연 작업을 사용하는 경우 작업자를 시작해야합니다.
$ sudo -H systemctl start [email protected]동기화 :
$ cd redmine
$ RAILS_ENV=production bin/rails full_text_search:synchronize UPSERT=later 다음은 다음과 같은 유용한 도구입니다.
dev/run-mysql.sh 및 dev/run-postgresql.sh : docker의 새로운 rdbms 인스턴스를 실행합니다.dev/initialize-redmine.sh : redmine 초기화.dev/run-test.sh : 전체 텍스트 검색 플러그인에 대한 테스트 실행.클론 소스 코드. 이것은 한 번만 필요합니다.
$ git clone https://github.com/redmine/redmine.git
$ cd redmine
$ git checkout 5.0-stable # or something
$ git clone [email protected]: ${YOUR_FORK} /redmine_full_text_search.git plugins/full_text_search plugins/ 에 더 많은 플러그인을 추가 할 수 있습니다.
적절한 데이터베이스 구성 선택 :
$ ln -fs ../plugins/full_text_search/config/database.yml.example. ${REDMINE_VERSION} . ${RDBMS} config/database.yml다음은 redmine 5.0 및 mysql을 사용하는 예입니다.
$ ln -fs ../plugins/full_text_search/config/database.yml.example.5.0.mysql config/database.ymlRDBMS를 실행하십시오.
MySQL의 경우 :
$ plugins/full_text_search/dev/run-mysql.sh /tmp/mysqlpostgresql의 경우 :
$ plugins/full_text_search/dev/run-postgresql.sh /tmp/postgresqlRedmine 초기화 :
$ plugins/full_text_search/dev/initialize-redmine.sh실행 테스트 :
$ plugins/full_text_search/dev/run-test.sh 각 검색 대상에 대한 Mapper 클래스를 만들어야합니다. 자세한 내용은 lib/full_text_search/*_mapper.rb 참조하십시오.
require_dependency "full_text_search/XXX_mapper init.rb 에 추가 하여이 새로운 맵퍼 클래스를로드해야합니다.
일반적인 Redmine 개발 방식으로 변경 사항을 확인할 수 있습니다.
예를 들어 다음은 redmine을 실행하는 명령 줄입니다.
$ bin/rails server다음 파일에 테스트를 추가해야합니다.
test/unit/full_text_search/XXX_test.rbtest/functional/full_text_search/search_controller_test.rb다음은 테스트를 실행하기위한 명령 줄입니다.
$ plugins/full_text_search/dev/run-test.sh TESTOPTS 으로 테스트 옵션을 지정할 수 있습니다.
$ plugins/full_text_search/dev/run-test.sh TESTOPTS= " -n/test_XXX/ " TESTOPTS=--help 로 모든 테스트 옵션을 볼 수 있습니다.
$ plugins/full_text_search/dev/run-test.sh TESTOPTS=--help Kenji Okimoto
sutou kouhei <[email protected]>
Shimadzu Corporation
MIT 라이센스. 자세한 내용은 라이센스를 참조하십시오.
asserts/stylesheets/fontawesome*/**/*asserts/stylesheets/fontawesome*/LICENSE.txt 참조하십시오 git checkout -b my-new-feature )git commit -am 'Add some feature' )git push origin my-new-feature )