Smarter Search for Bitbucket has advanced configuration settings. These settings should only be adjusted by advanced users.
Internal ES Node
Check this box to use an internal elasticsearch service.
Check this box to enable indexing of new source code & commits
Indexing Concurrency Limit
Maximum number of concurrent indexing jobs
Maximum size (in bytes) of source code files to index
Timeout (in ms) of all search requests
Comma-separated list of file extensions to exclude from syntax highlighting
Maximum number of lines to display for file previews
Maximum number of lines to display for file matches
Maximum number of match fragments to display for file matches
Number of results to display per page
Commit Hash Boost
Boosting factor of results with matching commit hashes (relative to source code matches)
Commit Subject Boost
Boosting factor of results with matching commit subjects
Commit Body Boost
Boosting factor of results with matching commit message bodies
Boosting factor of results with matching file names
By default, only master and develop are indexed. Individual repo admins may modify these settings as follows:
Go to the
Smarter Search for Bitbucket Repository Settingspage in your repository settings panel.
Change the ref regex to match your desired branches.
Save and Reindexto save the settings and subsequently reindex all repositories.
You can also disable indexing for a specific repository.
For example if we wanted to add the branch
my-branch, we would modify the regex to look like :
How to specify based on naming conventions
The end of the regular expression is not open-ended. It matches the whole Ref name. Imagine there is a hidden
^ at the beginning and
$ at the end of the regex. This means you need to use greedy modifiers like
.* to match more complicated rules than a specific branch name.
Example: So if you wanted to match HEAD, master, and any branches that follow a naming convention like “release/1.0”, “release/1.1”, etc., you could use this regular expression:
Early plugin versions use several files for logging
The following log files were placed to
Type of logs
All logs of nominal plugin operations, with any errors.
All logs of nominal plugin operations, as well as debugging logs.
Logs for only the internal Elasticsearch node.
Logs for only the internal Elasticsearch node, as well as debugging logs.
As of version 2.9 logging system is changed to use atlassian-bitbucket.log for everything. Amount of information logged is controlled by logging level
To enable debug logging execute the following command:
curl -u admin:<password> -v -X PUT -H "Content-Type: application/json" <bitbucket url>/rest/api/latest/logs/logger/com.mohamicorp.stash.searchforstash/debug
To disable the debug output, restart your Bitbucket or run the following command:
curl -u admin:<password> -v -X PUT -H "Content-Type: application/json" <bitbucket url>/rest/api/latest/logs/logger/com.mohamicorp.stash.searchforstash/info