Useful in case the client wants to re-evaluate what was set
here, or if the SearchEngine implementation wants to expose
some of its states.
In our case it allows CirrusSearch to inform SpecialSearch
that we prefer to display search results with a new experimental
layout.
Bug: T156299
Change-Id: I7f661c852ef70ea7bc9ae2959f7d6e48776a9877
$this->features[$feature] = $data;
}
+ /**
+ * Way to retrieve custom data set by setFeatureData
+ * or by the engine itself.
+ * @since 1.29
+ * @param string $feature feature name
+ * @return mixed the feature value or null if unset
+ */
+ public function getFeatureData( $feature ) {
+ if ( isset ( $this->features[$feature] ) ) {
+ return $this->features[$feature];
+ }
+ return null;
+ }
+
/**
* When overridden in derived class, performs database-specific conversions
* on text to be used for searching or updating search index.