On 10/25/21 9:23 AM, Matto Marjanovic wrote:
...
o SearchDataForIndexHook is run by
getDataForSearchIndex() in each
ContentHandler, but the design ensures that it is run at some
ambiguous place in the middle of getDataForSearchIndex(), instead
of resolutely at the end.
o SearchIndexFieldsHook *is not* run by getFieldsForSearchIndex() of a
ContentHandler. This means that CirrusSearch\BuildDocument never
sees the definitions for any fields added by the hook. The only code
in CirrusSearch that does see the definitions is MappingConfigBuilder
(maintenance code).
I suppose I should figure out how to file a bug report somewhere.
Follow-up for anyone following this thread: with thanks to all the
good documentation (and those who wrote/write it), I did indeed file a
bug report and a (first) patch.
https://phabricator.wikimedia.org/T294405
-mm