Extension:CirrusSearch

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:CirrusSearch and the translation is 8% complete.
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎français • ‎português do Brasil • ‎русский • ‎中文 • ‎日本語
MediaWiki manüel uzantıları
OOjs UI icon advanced.svg
CirrusSearch
Sürüm durumu: kararlı
Uygulama Ara, API , Kanca
Açıklama Elasticsearch kullanarak MediaWiki aramasını uygular
Yazar(lar) Nik Everett, Chad Horohoe, Erik Bernhardson
En son sürüm güncellemeler devam etmekte
Uyumluluk politikası sürüm dalları
Lisans GNU Genel Kamu Lisansı 2.0 veya üstü
İndir
README
  • $wgCirrusSearchLanguageWeight
  • $wgCirrusSearchUseIcuFolding
  • $wgCirrusSearchStemmedWeight
  • $wgCirrusSearchQueryStringMaxDeterminizedStates
  • $wgCirrusSearchCrossClusterSearch
  • $wgCirrusSearchExtraIndexSettings
  • $wgCirrusSearchTalkNamespaceWeight
  • $wgCirrusSearchPrefixWeights
  • $wgCirrusSearchPrefixSearchRescoreProfile
  • $wgCirrusSearchLanguageToWikiMap
  • $wgCirrusSearchCompletionSuggesterUseDefaultSort
  • $wgCirrusSearchMoreLikeThisMaxQueryTermsLimit
  • $wgCirrusSearchUseIcuTokenizer
  • $wgCirrusSearchOptimizeIndexForExperimentalHighlighter
  • $wgCirrusSearchRescoreProfiles
  • $wgCirrusSearchPhraseRescoreBoost
  • $wgCirrusSearchInterwikiProv
  • $wgCirrusSearchDefaultCluster
  • $wgCirrusSearchElasticQuirks
  • $wgCirrusSearchFallbackProfiles
  • $wgCirrusSearchMoreLikeThisTTL
  • $wgCirrusSearchAllowLeadingWildcard
  • $wgCirrusSearchInterwikiPrefixOverrides
  • $wgCirrusSearchMaintenanceTimeout
  • $wgCirrusSearchReplicas
  • $wgCirrusSearchPhraseSlop
  • $wgCirrusSearchCrossProjectSearchBlackList
  • $wgCirrusSearchBoostOpening
  • $wgCirrusSearchWriteBackoffExponent
  • $wgCirrusSearchUserTesting
  • $wgCirrusSearchShardCount
  • $wgCirrusSearchUseCompletionSuggester
  • $wgCirrusSearchPhraseSuggestReverseField
  • $wgCirrusSearchFallbackProfile
  • $wgCirrusSearchFragmentSize
  • $wgCirrusSearchUnlinkedArticlesToUpdate
  • $wgCirrusSearchClientSideUpdateTimeout
  • $wgCirrusSearchIgnoreOnWikiBoostTemplates
  • $wgCirrusSearchRegexMaxDeterminizedStates
  • $wgCirrusSearchInterwikiHTTPConnectTimeout
  • $wgCirrusSearchExtraIndexes
  • $wgCirrusSearchCategoryDepth
  • $wgCirrusSearchMergeSettings
  • $wgCirrusSearchClusters
  • $wgCirrusSearchAllFields
  • $wgCirrusSearchBannedPlugins
  • $wgCirrusSearchMoreLikeThisConfig
  • $wgCirrusSearchClusterOverrides
  • $wgCirrusSearchCrossProjectBlockScorerProfiles
  • $wgCirrusSearchNearMatchWeight
  • $wgCirrusSearchReplicaGroup
  • $wgCirrusSearchIndexedRedirects
  • $wgCirrusSearchIndexAllocation
  • $wgCirrusSearchNumCrossProjectSearchResults
  • $wgCirrusSearchLanguageDetectors
  • $wgCirrusSearchUpdateShardTimeout
  • $wgCirrusSearchEnableCrossProjectSearch
  • $wgCirrusSearchFullTextQueryBuilderProfiles
  • $wgCirrusSearchCompletionDefaultScore
  • $wgCirrusSearchWriteClusters
  • $wgCirrusSearchCompletionSuggesterHardLimit
  • $wgCirrusSearchRecycleCompletionSuggesterIndex
  • $wgCirrusSearchExtraIndexClusterBlacklist
  • $wgCirrusSearchLogElasticRequests
  • $wgCirrusSearchConnectionAttempts
  • $wgCirrusSearchWikiToNameMap
  • $wgCirrusSearchMaxFullTextQueryLength
  • $wgCirrusSearchLogElasticRequestsSecret
  • $wgCirrusSearchEnableRegex
  • $wgCirrusSearchClientSideSearchTimeout
  • $wgCirrusSearchExtraBackendLatency
  • $wgCirrusSearchNamespaceMappings
  • $wgCirrusSearchPreferRecentUnspecifiedDecayPortion
  • $wgCirrusSearchSearchShardTimeout
  • $wgCirrusSearchPrivateClusters
  • $wgCirrusSearchSimilarityProfiles
  • $wgCirrusSearchWMFExtraFeatures
  • $wgCirrusSearchNamespaceResolutionMethod
  • $wgCirrusSearchPoolCounterKey
  • $wgCirrusSearchCompletionProfiles
  • $wgCirrusSearchMaxShardsPerNode
  • $wgCirrusSearchCategoryMax
  • $wgCirrusSearchCategoryEndpoint
  • $wgCirrusSearchSimilarityProfile
  • $wgCirrusExploreSimilarResults
  • $wgCirrusSearchTextcatModel
  • $wgCirrusSearchRefreshInterval
  • $wgCirrusSearchEnableArchive
  • $wgCirrusSearchIndexDeletes
  • $wgCirrusSearchPrefixSearchStartsWithAnyWord
  • $wgCirrusSearchUpdateConflictRetryCount
  • $wgCirrusSearchInterwikiHTTPTimeout
  • $wgCirrusSearchFetchConfigFromApi
  • $wgCirrusSearchFiletypeAliases
  • $wgCirrusSearchExtraIndexBoostTemplates
  • $wgCirrusSearchDevelOptions
  • $wgCirrusSearchPhraseSuggestUseOpeningText
  • $wgCirrusSearchPrefixIds
  • $wgCirrusSearchMoreLikeThisFields
  • $wgCirrusSearchFullTextQueryBuilderProfile
  • $wgCirrusSearchStripQuestionMarks
  • $wgCirrusSearchSanityCheck
  • $wgCirrusSearchIndexBaseName
  • $wgCirrusSearchNamespaceWeights
  • $wgCirrusSearchCrossProjectOrder
  • $wgCirrusSearchMasterTimeout
  • $wgCirrusSearchTextcatConfig
  • $wgCirrusSearchMoreAccurateScoringMode
  • $wgCirrusSearchMaxPhraseTokens
  • $wgCirrusSearchInterwikiThreshold
  • $wgCirrusSearchRescoreProfile
  • $wgCirrusSearchRescoreFunctionChains
  • $wgCirrusSearchMaxIncategoryOptions
  • $wgCirrusSearchCrossProjectShowMultimedia
  • $wgCirrusSearchWikimediaExtraPlugin
  • $wgCirrusSearchCrossProjectProfiles
  • $wgCirrusSearchLinkedArticlesToUpdate
  • $wgCirrusSearchEnableAltLanguage
  • $wgCirrusSearchPreferRecentDefaultHalfLife
  • $wgCirrusSearchCompletionSuggesterSubphrases
  • $wgCirrusSearchFunctionRescoreWindowSize
  • $wgCirrusSearchEnablePhraseSuggest
  • $wgCirrusSearchCompletionSettings
  • $wgCirrusSearchUseExperimentalHighlighter
  • $wgCirrusSearchDropDelayedJobsAfter
  • $wgCirrusSearchFeedbackLink
  • $wgCirrusSearchUpdateDelay
  • $wgCirrusSearchInterleaveConfig
  • $wgCirrusSearchPhraseRescoreWindowSize
  • $wgCirrusSearchDefaultNamespaceWeight
  • $wgCirrusSearchMoreLikeThisAllowedFields
  • $wgCirrusSearchClientSideConnectTimeout
  • $wgCirrusSearchPhraseSuggestUseText
  • $wgCirrusSearchPhraseSuggestProfiles
  • $wgCirrusSearchPreferRecentDefaultDecayPortion
  • $wgCirrusSearchInterwikiSources
  • $wgCirrusSearchWeights
  • $wgCirrusSearchBoostTemplates
  • $wgCirrusSearchICUFoldingUnicodeSetFilter
  • $wgCirrusSearchSlowSearch
Translatewiki.net adresinde mevcutsa, CirrusSearch uzantısını çevirin
Kullanım ve sürüm matrisini kontrol edin.
Vagrant rolü cirrussearch
Sorunlar Açık görevler · Hata bildir

CirrusSearch uzantısı, Elasticsearch kullanarak MediaWiki aramasını gerçekleştirir.

Bu sayfa kurulum içindir. After the install is working, see Help:CirrusSearch for usage.

Goals

  • No native dependencies that would make this difficult to install
    • The only dependencies are pure-PHP MediaWiki extensions and Elasticsearch itself
  • Provide a near-real-time search index for wiki pages that's extendable by other MediaWiki extensions
  • Provide all of the query options MWSearch has given users, and more

Dependencies

PHP and cURL
Elasticsearch

  • MediaWiki 1.29.x and 1.30.x require Elasticsearch 5.3.x or 5.4.x.
  • MediaWiki 1.31.x and 1.32.x require Elasticsearch 5.5.x or 5.6.x.
  • MediaWiki 1.33.x and 1.34.x require Elasticsearch 6.5.x (6.5.4 recommended).

Take note that a Java installation like OpenJDK is needed in addition.

Elastica
  • Elastica is a PHP library to talk to Elasticsearch. Install Elastica per the instructions below.

Other
  • Due to the actual handling of jobs by the CirrusSearch extension, it is advisable to set up jobs in Redis to prevent messages like Notice: unserialize(): Error at offset 64870 of 65535 bytes in JobQueueDB.php and subsequent errors like Unsupported operand types. See görev T157759.

Installation

Elastica

Even though the instructions below tell you to only run Composer when installing from git, it may be necessary to issue it anyway in order to install all PHP dependencies.

  • İndir ve dosyaları extensions/ klasörünüzdeki Elastica adlı bir dizine yerleştirin.
  • Sadece git'ten kurarken PHP bağımlılıklarını kurmak için Composer komutunu çalıştırın, eklenti dizinine composer install --no-dev vererek. (Potansiyel komplikasyonlar için T173141 bakınız.)
  • LocalSettings.php'inizin altına aşağıdaki kodu ekleyin:
    wfLoadExtension( 'Elastica' );
    
  • Yes Yapıldı – Uzantının başarıyla yüklendiğini doğrulamak için wikinizde Special:Version seçeneğine gidin.

CirrusSearch

  • İndir ve dosyaları extensions/ klasörünüzdeki CirrusSearch adlı bir dizine yerleştirin.
  • LocalSettings.php'inizin altına aşağıdaki kodu ekleyin:
    wfLoadExtension( 'CirrusSearch' );
    
  • Now follow the setup instructions in the CirrusSearch README delivered with your extension i.e. $IP/extensions/CirrusSearch/README. Note that all info in it might not apply to your version of the extension, especially the version of Elasticsearch supported.
  • Configure as required.
  • Yes Yapıldı – Uzantının başarıyla yüklendiğini doğrulamak için wikinizde Special:Version seçeneğine gidin.

Upgrading

Please follow the upgrade instructions in the CirrusSearch UPGRADE file.

Configuration

The configuration parameters of CirrusSearch are documented at the "settings.txt" file, and also in the "CirrusSearch.php" file. See also documentation on CirrusSearch configuration profiles.

Elasticsearch will fail to index for CirrusSearch if one is using a database name for MySQL which contains a capital character, e.g. "MyWikiDatabaseName". To mitigate this CirrusSearch provides the $wgCirrusSearchIndexBaseName configuration parameter which one needs to set, e.g. $wgCirrusSearchIndexBaseName = 'mywikidatabasename';.

Hooks

CirrusSearch extension defines a number of hooks that other extensions can make use of to extend the core schema and modify documents. The following hooks are available:

API

CirrusSearch features can be used in API queries. Searching happens via the normal search API, action=query&list=search; you can use CirrusSearch-specific features, such as the morelike: special prefix to find pages related to Marie Curie and radium: api.php?action=query&list=search&srsearch=morelike:Marie_Curie%7Cradium&srlimit=10&srprop=size&formatversion=2 Custom APIs and parameters are provided for querying CirrusSearch configuration and debug information:

See also

Local development

Elastic Search service can be run with the Vagrant role (cirrussearch) and MediaWiki Vagrant.

For Docker, you can use a command like docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.8.2. Then follow the installation and configuration directions. If your web host is in a container you'll want to make sure the above container is on the same network, and in LocalSettings.php you will want to reference elasticsearch as the host name. This will not have the WMF plugins but can be sufficient for basic testing.