feat(indexer): skip blobs indexing when there is skip-blobs flag
What does this MR do and why?
Related: gitlab#557397
This change adds a new command-line option called --skip-blobs that allows users to skip indexing file contents while still indexing commit information.
The main modifications include:
- Adding a new flag
--skip-blobsto the command-line interface - Moving an existing test function to a different location in the file for better organization
- Creating a new test that verifies the skip-blobs functionality works correctly - it confirms that when this option is used, commits are still indexed but file contents are ignored
- Updating the core indexing logic to check this flag and conditionally skip blob indexing when requested
This flag can be set from Rails when the setting elasticsearch_code_scope is disabled.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Ravi Kumar