The current payload returned by cirrusDoc is currently quite large, and we are trying to find way to make its size smaller.
One possible solution would be to reduce the returned information from CirrusDoc. Currently this payload include lots of information that are not currently used by Search Preview.
Currently we just need the following fields:
- heading -> for the sections
- title, redirect.title, category, heading, text, auxiliary_text, file_text, source_text... -> for the snippets
Further information in this slack thread: https://wikimedia.slack.com/archives/CKZ5CPBQX/p1664883272109109
AC:
- Expose from which field an article snippets comes from (wikitext or stripped version)
- See quick-and-dirty POC here: https://gerrit.wikimedia.org/r/838165
- Note: does not need to be implemented now; will be part of snippets in milestone 4
- Define arguments in CirrusSearch\Api\QueryCirrusDoc to allow us to retrieve just a couple of relevant fields
- Change the UI to request just the data it needs