jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/392469 )
Change subject: Add API action for dumping cirrus articles
..
Add API action for dumping cirrus articles
This is particularly convenient for the browser tests to use, so they
can ping the api to see if an article that it created/updated is now
in cirrussearch.
Change-Id: I5dbd02592eebb166362c7cb9dabcd2b93bae66c5
---
M CirrusSearch.php
M autoload.php
M i18n/en.json
M i18n/qqq.json
R includes/Api/ApiTrait.php
M includes/Api/ConfigDump.php
M includes/Api/FreezeWritesToCluster.php
M includes/Api/MappingDump.php
A includes/Api/QueryCirrusDoc.php
M includes/Api/SettingsDump.php
M includes/Api/SuggestIndex.php
M tests/integration/features/step_definitions/page_step_helpers.js
12 files changed, 157 insertions(+), 9 deletions(-)
Approvals:
Smalyshev: Looks good to me, approved
Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/CirrusSearch.php b/CirrusSearch.php
index bf53382..0bd827c 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -1336,6 +1336,7 @@
$wgAPIModules['cirrus-config-dump'] = 'CirrusSearch\Api\ConfigDump';
$wgAPIModules['cirrus-mapping-dump'] = 'CirrusSearch\Api\MappingDump';
$wgAPIModules['cirrus-settings-dump'] = 'CirrusSearch\Api\SettingsDump';
+$wgAPIPropModules['cirrusdoc'] = 'CirrusSearch\Api\QueryCirrusDoc';
/**
* Configs
diff --git a/autoload.php b/autoload.php
index 1cb17de..f098fcc 100644
--- a/autoload.php
+++ b/autoload.php
@@ -5,10 +5,11 @@
$wgAutoloadClasses += [
'CirrusSearch' => __DIR__ . '/includes/CirrusSearch.php',
- 'CirrusSearch\\Api\\ApiBase' => __DIR__ . '/includes/Api/ApiBase.php',
+ 'CirrusSearch\\Api\\ApiTrait' => __DIR__ . '/includes/Api/ApiTrait.php',
'CirrusSearch\\Api\\ConfigDump' => __DIR__ .
'/includes/Api/ConfigDump.php',
'CirrusSearch\\Api\\FreezeWritesToCluster' => __DIR__ .
'/includes/Api/FreezeWritesToCluster.php',
'CirrusSearch\\Api\\MappingDump' => __DIR__ .
'/includes/Api/MappingDump.php',
+ 'CirrusSearch\\Api\\QueryCirrusDoc' => __DIR__ .
'/includes/Api/QueryCirrusDoc.php',
'CirrusSearch\\Api\\SettingsDump' => __DIR__ .
'/includes/Api/SettingsDump.php',
'CirrusSearch\\Api\\SuggestIndex' => __DIR__ .
'/includes/Api/SuggestIndex.php',
'CirrusSearch\\BaseInterwikiResolver' => __DIR__ .
'/includes/BaseInterwikiResolver.php',
diff --git a/i18n/en.json b/i18n/en.json
index ab44497..428c84c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -23,6 +23,9 @@
"apihelp-cirrus-settings-dump-description": "Dump of CirrusSearch
settings for this wiki.",
"apihelp-cirrus-settings-dump-summary": "Dump of CirrusSearch settings
for this wiki.",
"apihelp-cirrus-settings-dump-example": "Get a dump of CirrusSearch
settings for this wiki.",
+ "apihelp-query+cirrusdoc-description": "Dump of a CirrusSearch article
document",
+ "apihelp-query+cirrusdoc-summary": "Dump of a CirrusSearch article
document",
+ "apihelp-query+cirrusdoc-example": "Get a dump of a single CirrusSearch
article.",
"apierror-cirrus-requesttoolong": "Prefix search request was longer
than the maximum allowed length. ($1 $2)",
"cirrussearch-give-feedback": "Give us your feedback",
"cirrussearch-morelikethis-settings": " # \n# This message lets you configure the settings of the
\"more like this\" feature.\n# Changes to this take effect immediately.\n# The
syntax is as follows:\n# * Everything from a \"#\" character to the end of
the line is a comment.\n# * Every non-blank line is the setting name followed
by a \":\" character followed by the setting value\n# The settings are:\n# *
min_doc_freq (integer): Minimum number of documents (per shard) that need a
term for it to be considered.\n# * max_doc_freq (integer): Maximum number of
documents (per shard) that have a term for it to be considered.\n#
High frequency terms are generally \"stop words\".\n# * max_query_terms
(integer): Maximum number of terms to be considered. This value is limited to
$wgCirrusSearchMoreLikeThisMaxQueryTermsLimit (100).\n# * min_term_freq
(integer): Minimum number of times the term appears in the input to doc to be
considered. For small fields (title) this value should be 1.\n# *
minimum_should_match (percentage -100% to 100%, or integer number of terms):
The percentage of terms to match on. Defaults to 30%.\n# * min_word_len
(integer): Minimal length of a term to be considered. Defaults to 0.\n# *
max_word_len (integer): The maximum word length above which words will be
ignored. Defaults to unbounded (0).\n# * fields (comma separated list of
values): These are the fields to use. Allowed fields are title, text,
auxiliary_text, opening_text, headings.\n# Examples of good lines:\n#