"미디어위키 Elastica, CirrusSearch 설치"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(다른 사용자 한 명의 중간 판 13개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;미디어위키 Elastica 설치
;미디어위키 Elastica 설치
==사전작업==
* [[Elasticsearch 설치]]


==확장기능 설치==
==확장기능 설치==
<source lang='console'>
<syntaxhighlight lang='console'>
testuser@zetawiki:~$ cd /var/www/html/w/extensions
testuser@zetawiki:~$ cd /var/www/html/w/extensions
testuser@zetawiki:/var/www/html/w/extensions$ git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Elastica.git
testuser@zetawiki:/var/www/html/w/extensions$ git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Elastica.git
19번째 줄: 22번째 줄:
Writing lock file
Writing lock file
Generating autoload files
Generating autoload files
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w/extensions/Elastica$ cd ..
testuser@zetawiki:/var/www/html/w/extensions/Elastica$ cd ..
testuser@zetawiki:/var/www/html/w/extensions$ git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CirrusSearch.git
testuser@zetawiki:/var/www/html/w/extensions$ git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CirrusSearch.git
28번째 줄: 31번째 줄:
Resolving deltas: 100% (32249/32249), done.
Resolving deltas: 100% (32249/32249), done.
Checking connectivity... done.
Checking connectivity... done.
</source>
</syntaxhighlight>


==설정 1==
==설정 1==
<source lang='console'>
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w/extensions$ cd ..
testuser@zetawiki:/var/www/html/w/extensions$ cd ..
testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php  
testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php  
</source>
</syntaxhighlight>
<source lang='php'>
<syntaxhighlight lang='php'>
wfLoadExtension( 'Elastica' );
wfLoadExtension( 'Elastica' );
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
$wgDisableSearchUpdate = true;
$wgDisableSearchUpdate = true;
# $wgCirrusSearchServers = ['135.79.246.80'];
# $wgCirrusSearchServers = ['135.79.246.80'];
</source>
</syntaxhighlight>


==스크립트 실행==
==스크립트 실행==
<source lang='console'>
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php updateSearchIndexConfig.php  
testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php updateSearchIndexConfig.php  
content index...
content index...
52번째 줄: 55번째 줄:
Deleting namespaces...done
Deleting namespaces...done
Indexing namespaces...done
Indexing namespaces...done
</source>
</syntaxhighlight>
 
==설정 2==
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php
</syntaxhighlight>
<syntaxhighlight lang='php' highlight='3'>
wfLoadExtension( 'Elastica' );
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
# $wgDisableSearchUpdate = true;
# $wgCirrusSearchServers = ['135.79.246.80'];
</syntaxhighlight>
:→ <code>$wgDisableSearchUpdate</code> 주석 처리
 
==스크립트 실행 2==
* 아래 작업은 오래 걸린다...
:예를 들어, 전체 36000개의 문서를 초당 10개씩 인덱싱하면 약 1시간 걸린다.
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php forceSearchIndex.php --skipLinks --indexOnSkip
[          jmnote-nt_] Indexed 9 pages ending at 12 at 10/second
[          jmnote-nt_] Indexed 9 pages ending at 25 at 13/second
[          jmnote-nt_] Indexed 7 pages ending at 37 at 14/second
... (생략)
[          jmnote-nt_] Indexed 4 pages ending at 133780 at 8/second
[          jmnote-nt_] Indexed 5 pages ending at 133790 at 8/second
[          jmnote-nt_] Indexed 2 pages ending at 133796 at 8/second
Indexed a total of 87373 pages at 8/second
</syntaxhighlight>
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php forceSearchIndex.php --skipParse
[          jmnote-nt_] Indexed 41 pages ending at 61 at 21/second
[          jmnote-nt_] Indexed 38 pages ending at 114 at 24/second
[          jmnote-nt_] Indexed 35 pages ending at 168 at 24/second
... (생략)
[          jmnote-nt_] Indexed 13 pages ending at 133730 at 48/second
[          jmnote-nt_] Indexed 20 pages ending at 133780 at 48/second
[          jmnote-nt_] Indexed 33 pages ending at 133826 at 48/second
Indexed a total of 87399 pages at 48/second
</syntaxhighlight>
 
==설정 3==
<syntaxhighlight lang='console'>
testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php
</syntaxhighlight>
<syntaxhighlight lang='php' highlight='3'>
wfLoadExtension( 'Elastica' );
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
$wgSearchType = 'CirrusSearch';
# $wgDisableSearchUpdate = true;
# $wgCirrusSearchServers = ['135.79.246.80'];
</syntaxhighlight>
:→ <code>$wgSearchType </code> 추가


==같이 보기==
==같이 보기==
* [[같이보기]]
* [[Elasticsearch]]
* [[같이보기]]
* [[같이보기]]
* [[같이보기]]


==참고==
==참고==
* {{위키백과}}
* https://www.mediawiki.org/wiki/Extension:CirrusSearch
* {{위키낱말사전}}
* https://github.com/wikimedia/mediawiki-extensions-CirrusSearch ★
* {{다음사전}}
* {{다음백과}}
* {{네이버사전}}
* {{네이버백과}}


[[분류: 명사]]
[[분류: 미디어위키]]
[[분류: 분류1]]
[[분류: 분류2]]

2020년 11월 2일 (월) 02:58 기준 최신판

1 개요[ | ]

미디어위키 Elastica 설치

2 사전작업[ | ]

3 확장기능 설치[ | ]

testuser@zetawiki:~$ cd /var/www/html/w/extensions
testuser@zetawiki:/var/www/html/w/extensions$ git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Elastica.git
Cloning into 'Elastica'...
remote: Total 1418 (delta 0), reused 1418 (delta 0)
Receiving objects: 100% (1418/1418), 436.34 KiB | 548.00 KiB/s, done.
Resolving deltas: 100% (882/882), done.
Checking connectivity... done.
testuser@zetawiki:/var/www/html/w/extensions$ cd Elastica
testuser@zetawiki:/var/www/html/w/extensions/Elastica$ composer install --no-dev
Loading composer repositories with package information
Updating dependencies
Package operations: 1 install, 0 updates, 0 removals
  - Installing ruflin/elastica (5.1.0): Downloading (100%)         
Writing lock file
Generating autoload files
testuser@zetawiki:/var/www/html/w/extensions/Elastica$ cd ..
testuser@zetawiki:/var/www/html/w/extensions$ git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CirrusSearch.git
Cloning into 'CirrusSearch'...
remote: Total 37652 (delta 0), reused 37652 (delta 0)
Receiving objects: 100% (37652/37652), 7.56 MiB | 3.35 MiB/s, done.
Resolving deltas: 100% (32249/32249), done.
Checking connectivity... done.

4 설정 1[ | ]

testuser@zetawiki:/var/www/html/w/extensions$ cd ..
testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php
wfLoadExtension( 'Elastica' );
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
$wgDisableSearchUpdate = true;
# $wgCirrusSearchServers = ['135.79.246.80'];

5 스크립트 실행[ | ]

testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php updateSearchIndexConfig.php 
content index...
	Fetching Elasticsearch version...5.6.9...ok
	Scanning available plugins...none
... (생략)
		Updating tracking indexes...done
		Deleting namespaces...done
		Indexing namespaces...done

6 설정 2[ | ]

testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php
wfLoadExtension( 'Elastica' );
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
# $wgDisableSearchUpdate = true;
# $wgCirrusSearchServers = ['135.79.246.80'];
$wgDisableSearchUpdate 주석 처리

7 스크립트 실행 2[ | ]

  • 아래 작업은 오래 걸린다...
예를 들어, 전체 36000개의 문서를 초당 10개씩 인덱싱하면 약 1시간 걸린다.
testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php forceSearchIndex.php --skipLinks --indexOnSkip
[          jmnote-nt_] Indexed 9 pages ending at 12 at 10/second
[          jmnote-nt_] Indexed 9 pages ending at 25 at 13/second
[          jmnote-nt_] Indexed 7 pages ending at 37 at 14/second
... (생략)
[          jmnote-nt_] Indexed 4 pages ending at 133780 at 8/second
[          jmnote-nt_] Indexed 5 pages ending at 133790 at 8/second
[          jmnote-nt_] Indexed 2 pages ending at 133796 at 8/second
Indexed a total of 87373 pages at 8/second
testuser@zetawiki:/var/www/html/w/extensions/CirrusSearch/maintenance$ php forceSearchIndex.php --skipParse
[          jmnote-nt_] Indexed 41 pages ending at 61 at 21/second
[          jmnote-nt_] Indexed 38 pages ending at 114 at 24/second
[          jmnote-nt_] Indexed 35 pages ending at 168 at 24/second
... (생략)
[          jmnote-nt_] Indexed 13 pages ending at 133730 at 48/second
[          jmnote-nt_] Indexed 20 pages ending at 133780 at 48/second
[          jmnote-nt_] Indexed 33 pages ending at 133826 at 48/second
Indexed a total of 87399 pages at 48/second

8 설정 3[ | ]

testuser@zetawiki:/var/www/html/w$ vi LocalSettings.php
wfLoadExtension( 'Elastica' );
require_once "$IP/extensions/CirrusSearch/CirrusSearch.php";
$wgSearchType = 'CirrusSearch';
# $wgDisableSearchUpdate = true;
# $wgCirrusSearchServers = ['135.79.246.80'];
$wgSearchType 추가

9 같이 보기[ | ]

10 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}