Administration
NOTE: After careful consideration, as of July 1, 2023, this app has been retired and archived. Current customers will be supported until February 15th, 2024. Please contact our Support Team if you have any questions.
Configurable Parameters
Smarter Search for Bitbucket has advanced configuration settings. These settings should only be adjusted by advanced users.
Setting | Description |
---|---|
Internal ES Node | Check this box to use an internal elasticsearch service. |
Indexing | Check this box to enable indexing of new source code & commits |
Indexing Concurrency Limit | Maximum number of concurrent indexing jobs |
Max Filesize | Maximum size (in bytes) of source code files to index |
Search Timeout | Timeout (in ms) of all search requests |
Unhighlighted Extensions | Comma-separated list of file extensions to exclude from syntax highlighting |
Preview Limit | Maximum number of lines to display for file previews |
Match Limit | Maximum number of lines to display for file matches |
Fragment Limit | Maximum number of match fragments to display for file matches |
Page Size | 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 |
Filename Boost | Boosting factor of results with matching file names |
Repository Settings
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 Settings
page in your repository settings panel.Change the ref regex to match your desired branches.
Click
Save
orSave and Reindex
to 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 :
HEAD|(refs/heads/(master|develop|my-branch))
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:
HEAD|(refs/heads/(master|(release/.*)))
Logging
Early plugin versions use several files for logging
The following log files were placed to <bitbucket-home>/home/logs/
folder:
Log file | 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