Website "code search" feature does not find all instances of the target
Summary
I apologize in advance for using incorrect terms and/or improperly filling out this form.
When using the website interface GitLab.com, from my project page, I attempted to search for the name of a function that is used ~6 times in my project by using the search bar at the top of the screen. The list of results that is returned is grossly incomplete. It seems as though the search function stops after encountering the first instance of the target term in any file, and does not return any instances that occur lower in that file.
Steps to reproduce
The following section is code from one of the files in my project:
#if DDR_LOG_LEVEL >= DDR_LOG_LEVEL_INFO
# define ddr_info(...) \
do { \
if (ddr_get_log_verbose() >= DDR_LOG_LEVEL_INFO) \
ddr_pr(__VA_ARGS__); \
} while (0)
#else
# define ddr_info(...)
#endif
#if DDR_LOG_LEVEL >= DDR_LOG_LEVEL_VERBOSE
# define ddr_verbose(...) \
do { \
if (ddr_get_log_verbose() >= DDR_LOG_LEVEL_VERBOSE) \
ddr_pr(__VA_ARGS__); \
} while (0)
#else
# define ddr_verbose(...)
#endif
#if DDR_LOG_LEVEL >= DDR_LOG_LEVEL_DEBUG
# define ddr_debug(...) \
do { \
if (ddr_get_log_verbose() >= DDR_LOG_LEVEL_DEBUG) \
ddr_pr(__VA_ARGS__); \
} while (0)
#else
# define ddr_debug(...)
#endif
Using Microsoft Edge, I navigated to the base/home page for my project. I then typed the term ddr_get_log_verbose into the obvious "Search GitLab" search box at the top of the page. Some dropdown options appeared below the search box, and I selected the option to "search within this project". The default page it took me to after this was searching through the commits of this project, for which there were (correctly) no results found. I then clicked on the "Code" tab at the far left of the page, and was shown one code snippet from each of 3 different files where this term was found. One of the snippets was from the file I shared above. That snippet was the line containing ddr_get_log_verbose() >= DDR_LOG_LEVEL_INFO, plus two lines before and two lines after. The other two very obvious instances of the term on the following lines did not appear among the search results.
I did other experiments with other search terms and confirmed that this behavior is not unique to this file or this term. The search function will reliably stop scanning a file after it finds the first instance(s) of the target search term.
Example Project
What is the current bug behavior?
See description from "Steps to Reproduce".
What is the expected correct behavior?
I expected that the lines containing ddr_get_log_verbose() >= DDR_LOG_LEVEL_VERBOSE and ddr_get_log_verbose() >= DDR_LOG_LEVEL_DEBUG would be discovered/returned in addition to the one instance that it did find. I'm not sure about the "correct" way to format/display this information.
Relevant logs and/or screenshots
Screenshot of search results:
The project in question is confidential, so I have redacted the name of the project that this occurred in, and I am reluctant to share the link to it. I have left the company name because presumably you can see my user ID as bhenson.ampere and infer that I work at Ampere Computing.
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
This bug happens on GitLab.com. I do not believe my project environment is configured in a particularly rare or unusual manner.
Results of GitLab application Check
This bug happens on GitLab.com.
Possible fixes
Unknown