Chad has uploaded a new change for review.
https://gerrit.wikimedia.org/r/105224
Change subject: Allow other extensions to modify documents to be updated
......................................................................
Allow other extensions to modify documents to be updated
Change-Id: Iff0bf5d52ad2f35921c6734f3fb748bf360f2e9d
---
M README
M includes/Updater.php
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/24/105224/1
diff --git a/README b/README
index 1f9dcc5..bac4194 100644
--- a/README
+++ b/README
@@ -193,6 +193,13 @@
&config - multi-dimensional configuration array for analysis of various
languages and fields
$builder - instance of MappingConfigBuilder, for easier use of utility
methods to build fields
+'CirrusSearchBuildDocument': Allows to modify document being indexed
+ $doc - instance of Elastica\Document, fully built and ready to be indexed.
Look at, modify, and
+ add your own fields
+ $page - WikiPage being indexed, should refer to same document
+ $flags - Updater constants, INDEX_EVERYTHING, INDEX_ON_SKIP, SKIP_LINKS,
SKIP_PARSE. Please
+ respect SKIP_PARSE especially.
+
'CirrusSearchMappingConfig': Allows configuration of the mapping of fields
&config - multi-dimensional configuration array that contains page metadata
diff --git a/includes/Updater.php b/includes/Updater.php
index 823f461..6470042 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -442,6 +442,8 @@
}
wfProfileOut( __METHOD__ . '-redirects' );
}
+
+ wfRunHooks( 'CirrusSearchBuildDocument', array( $doc,
$page, $flags ) );
}
wfProfileIn( __METHOD__ . '-link-counts' );
--
To view, visit https://gerrit.wikimedia.org/r/105224
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff0bf5d52ad2f35921c6734f3fb748bf360f2e9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits