एक्सटेंशन:सिरसखोज

From mediawiki.org
This page is a translated version of the page Extension:CirrusSearch and the translation is 34% complete.
मीडियाविकि एक्सटेंशन मैन्युअल
OOjs UI icon advanced-invert.svg
CirrusSearch
प्रकाशन की स्थिति: स्थिर
कार्यान्वयन खोज, API , हुक
विवरण एलियस्टिक्स खोज का उपयोग करके मीडियाविकी की खोज करने वाले औजार
लेखक Nik Everett, Chad Horohoe, Erik Bernhardson
नवीनतम संस्करण निरंतर अद्यतन
संगतता नीति मीडियाविकि के साथ प्रकाशित स्नैपशॉट्स। मास्टर में पीछे की तरफ से संगतता नहीं है।
MediaWiki >= 1.37.0
Composer mediawiki/cirrussearch
लाइसेंस GNU साधारण सार्वजनिक लाइसेंस 2.0 या उसके बाद
डाउनलोड करें
README
  • $wgCirrusSearchLanguageWeight
  • $wgCirrusSearchAutomationCIDRs
  • $wgCirrusSearchUseIcuFolding
  • $wgCirrusSearchStemmedWeight
  • $wgCirrusSearchQueryStringMaxDeterminizedStates
  • $wgCirrusSearchCrossClusterSearch
  • $wgCirrusSearchExtraIndexSettings
  • $wgCirrusSearchAutomationUserAgentRegex
  • $wgCirrusSearchTalkNamespaceWeight
  • $wgCirrusSearchPrefixWeights
  • $wgCirrusSearchPrefixSearchRescoreProfile
  • $wgCirrusSearchDisableUpdate
  • $wgCirrusSearchActiveTest
  • $wgCirrusSearchMoreLikeThisMaxQueryTermsLimit
  • $wgCirrusSearchUseIcuTokenizer
  • $wgCirrusSearchCompletionBannedPageIds
  • $wgCirrusSearchOptimizeIndexForExperimentalHighlighter
  • $wgCirrusSearchRescoreProfiles
  • $wgCirrusSearchPhraseRescoreBoost
  • $wgCirrusSearchInterwikiProv
  • $wgCirrusSearchDefaultCluster
  • $wgCirrusSearchQueryStringMaxWildcards
  • $wgCirrusSearchElasticQuirks
  • $wgCirrusSearchMaxFileTextLength
  • $wgCirrusSearchFallbackProfiles
  • $wgCirrusSearchMoreLikeThisTTL
  • $wgCirrusSearchAllowLeadingWildcard
  • $wgCirrusSearchInterwikiPrefixOverrides
  • $wgCirrusSearchMaintenanceTimeout
  • $wgCirrusSearchReplicas
  • $wgCirrusSearchPhraseSlop
  • $wgCirrusSearchBoostOpening
  • $wgCirrusSearchWriteBackoffExponent
  • $wgCirrusSearchUserTesting
  • $wgCirrusSearchShardCount
  • $wgCirrusSearchUseCompletionSuggester
  • $wgCirrusSearchPhraseSuggestReverseField
  • $wgCirrusSearchFallbackProfile
  • $wgCirrusSearchFragmentSize
  • $wgCirrusSearchUnlinkedArticlesToUpdate
  • $wgCirrusSearchCustomPageFields
  • $wgCirrusSearchClientSideUpdateTimeout
  • $wgCirrusSearchIgnoreOnWikiBoostTemplates
  • $wgCirrusSearchRegexMaxDeterminizedStates
  • $wgCirrusSearchInterwikiHTTPConnectTimeout
  • $wgCirrusSearchExtraIndexes
  • $wgCirrusSearchCategoryDepth
  • $wgCirrusSearchMergeSettings
  • $wgCirrusSearchClusters
  • $wgCirrusSearchAllFields
  • $wgCirrusSearchBannedPlugins
  • $wgCirrusSearchMoreLikeThisConfig
  • $wgCirrusSearchClusterOverrides
  • $wgCirrusSearchCrossProjectBlockScorerProfiles
  • $wgCirrusSearchNearMatchWeight
  • $wgCirrusSearchWriteIsolateClusters
  • $wgCirrusSearchIndexedRedirects
  • $wgCirrusSearchIndexAllocation
  • $wgCirrusSearchNumCrossProjectSearchResults
  • $wgCirrusSearchLanguageDetectors
  • $wgCirrusSearchUpdateShardTimeout
  • $wgCirrusSearchEnableCrossProjectSearch
  • $wgCirrusSearchFullTextQueryBuilderProfiles
  • $wgCirrusSearchCompletionDefaultScore
  • $wgCirrusSearchWriteClusters
  • $wgCirrusSearchCompletionSuggesterHardLimit
  • $wgCirrusSearchRecycleCompletionSuggesterIndex
  • $wgCirrusSearchLogElasticRequests
  • $wgCirrusSearchConnectionAttempts
  • $wgCirrusSearchWikiToNameMap
  • $wgCirrusSearchMaxFullTextQueryLength
  • $wgCirrusSearchLogElasticRequestsSecret
  • $wgCirrusSearchEnableRegex
  • $wgCirrusSearchClientSideSearchTimeout
  • $wgCirrusSearchExtraBackendLatency
  • $wgCirrusSearchNamespaceMappings
  • $wgCirrusSearchWMFExtraFeatures
  • $wgCirrusSearchPreferRecentUnspecifiedDecayPortion
  • $wgCirrusSearchNamespaceResolutionMethod
  • $wgCirrusSearchCategoryMax
  • $wgCirrusSearchSearchShardTimeout
  • $wgCirrusSearchCategoryEndpoint
  • $wgCirrusSearchPrivateClusters
  • $wgCirrusSearchSimilarityProfiles
  • $wgCirrusSearchCrossProjectShowMultimedia
  • $wgCirrusSearchWeights
  • $wgCirrusSearchPoolCounterKey
  • $wgCirrusSearchCompletionProfiles
  • $wgCirrusSearchMaxShardsPerNode
  • $wgCirrusSearchEnableArchive
  • $wgCirrusSearchIndexDeletes
  • $wgCirrusSearchSimilarityProfile
  • $wgCirrusExploreSimilarResults
  • $wgCirrusSearchFiletypeAliases
  • $wgCirrusSearchDevelOptions
  • $wgCirrusSearchBoostTemplates
  • $wgCirrusSearchPrefixIds
  • $wgCirrusSearchPrefixSearchStartsWithAnyWord
  • $wgCirrusSearchUpdateConflictRetryCount
  • $wgCirrusSearchInterwikiHTTPTimeout
  • $wgCirrusSearchFetchConfigFromApi
  • $wgCirrusSearchFullTextQueryBuilderProfile
  • $wgCirrusSearchExtraIndexBoostTemplates
  • $wgCirrusSearchStripQuestionMarks
  • $wgCirrusSearchIndexBaseName
  • $wgCirrusSearchTextcatModel
  • $wgCirrusSearchMoreLikeThisFields
  • $wgCirrusSearchMasterTimeout
  • $wgCirrusSearchTextcatConfig
  • $wgCirrusSearchSanityCheck
  • $wgCirrusSearchInterwikiThreshold
  • $wgCirrusSearchNamespaceWeights
  • $wgCirrusSearchCrossProjectOrder
  • $wgCirrusSearchRescoreProfile
  • $wgCirrusSearchRescoreFunctionChains
  • $wgCirrusSearchMoreAccurateScoringMode
  • $wgCirrusSearchMaxPhraseTokens
  • $wgCirrusSearchCrossProjectSearchBlockList
  • $wgCirrusSearchCrossProjectProfiles
  • $wgCirrusSearchLanguageToWikiMap
  • $wgCirrusSearchMaxIncategoryOptions
  • $wgCirrusSearchEnableAltLanguage
  • $wgCirrusSearchWikimediaExtraPlugin
  • $wgCirrusSearchCompletionSuggesterUseDefaultSort
  • $wgCirrusSearchLinkedArticlesToUpdate
  • $wgCirrusSearchCompletionSuggesterSubphrases
  • $wgCirrusSearchPreferRecentDefaultHalfLife
  • $wgCirrusSearchSlowSearch
  • $wgCirrusSearchFunctionRescoreWindowSize
  • $wgCirrusSearchEnablePhraseSuggest
  • $wgCirrusSearchCompletionSettings
  • $wgCirrusSearchUseExperimentalHighlighter
  • $wgCirrusSearchFeedbackLink
  • $wgCirrusSearchUpdateDelay
  • $wgCirrusSearchRefreshInterval
  • $wgCirrusSearchInterleaveConfig
  • $wgCirrusSearchPhraseRescoreWindowSize
  • $wgCirrusSearchMoreLikeThisAllowedFields
  • $wgCirrusSearchPreferRecentDefaultDecayPortion
  • $wgCirrusSearchClientSideConnectTimeout
  • $wgCirrusSearchPhraseSuggestUseText
  • $wgCirrusSearchPhraseSuggestProfiles
  • $wgCirrusSearchDefaultNamespaceWeight
  • $wgCirrusSearchInterwikiSources
  • $wgCirrusSearchPhraseSuggestUseOpeningText
  • $wgCirrusSearchICUNormalizationUnicodeSetFilter
  • $wgCirrusSearchICUFoldingUnicodeSetFilter
  • $wgCirrusSearchReplicaGroup
CirrusSearch एक्सटेंशन को अनुवादित करें अगर यह translatewiki.net पर उपलब्ध है

उपयोग और संस्करण के मैट्रिक्स को देखें

आवारा भूमिका cirrussearch
मुद्दे अधूरे कार्य · बग की रिपोर्ट करें

The CirrusSearch extension implements searching for MediaWiki using Elasticsearch.

Elastic Search is a standalone third-party software that must be installed in advance. It's a database system that provides search and indexing functionality, and where the current text of all pages of your wiki will be indexed for faster search results. The communication between MediaWiki and ElasticSearch is done through web services.

यह पृष्ठ स्थापना के लिए है। इंस्टॉल के काम करने के बाद, उपयोग के लिए मदद: CirrusSearch देखें।

लक्ष्य

  • कोई देशी निर्भरता नहीं जो इसे स्थापित करना मुश्किल बना दे
    • 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

निर्भरता

PHP और cURL
Elasticsearch

Every version of ElasticSearch change how web services work, and cause compatibility problems. You must install the version of Elastic Search compatible with the version of MediaWiki you are currently using:

  • MediaWiki 1.29.x - 1.30.x require Elasticsearch 5.3.x - 5.4.x.
  • MediaWiki 1.31.x - 1.32.x require Elasticsearch 5.5.x - 5.6.x.
  • MediaWiki 1.33.x - 1.38.x require Elasticsearch 6.5.x - 6.8.x (6.8.23+ recommended)

Take note that a Java installation like OpenJDK is needed in addition. It's best to use the official Elasticsearch Docker image or a self-hosted version. A managed product like Amazon OpenSearch (formerly Amazon Elasticsearch) can work but may require additional configuration depending on its specifics. For example, Amazon OpenSearch only listens for Elasticsearch API requests over HTTPS on port 443 (i.e. it does not expose the default Elasticsearch port 9200), so a TLS-enabled proxy (e.g. Nginx) can enable CirrusSearch to communicate with an Amazon OpenSearch cluster.

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

अन्य
  • 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.

task T157759 देखें।

स्थापित

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.

  • फाइलों को डाउनलोड करें और अपने extensions/ फोल्डर के Elastica नामक डिरेक्ट्री में डालें।
  • सिर्फ गिट से डाउनलोड करते समय एक्सटेंशन डिरेक्ट्री से composer install --no-dev प्रकाशित करके PHP निर्भरताएँ स्थापित करने के लिए Composer चलाएँ। (संभावित जटिलताओं के लिए task T173141 देखें।)
  • अपनी LocalSettings.php के नीचे निम्नलिखित कोड जोड़ें:
    wfLoadExtension( 'Elastica' );
    
  • Yes पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।

CirrusSearch

  • फाइलों को डाउनलोड करें और अपने extensions/ फोल्डर के CirrusSearch नामक डिरेक्ट्री में डालें।
  • सिर्फ गिट से डाउनलोड करते समय एक्सटेंशन डिरेक्ट्री से composer install --no-dev प्रकाशित करके PHP निर्भरताएँ स्थापित करने के लिए Composer चलाएँ। (संभावित जटिलताओं के लिए task T173141 देखें।)
  • अपनी LocalSettings.php के नीचे निम्नलिखित कोड जोड़ें:
    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.
  • आवश्यकतानुसार कॉन्फ़िगर करें।
  • Yes पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।

उन्नयन

Please follow the upgrade instructions in the CirrusSearch UPGRADE file.

विन्यास

The configuration parameters of CirrusSearch are documented at the "settings.txt" 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';.

हुक

CirrusSearch extension defines a number of hooks that other extensions can make use of to extend the core schema and modify documents. निम्नलिखित हुक उपलब्ध हैं:

एपीआई

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:

यह भी देखें

सामान्य लिंक
डिबगिंग

स्थानीय विकास

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.