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.
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))
You can also disable indexing for a specific repository.
Plugin 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 |
sfb-plugin.log | All logs of nominal plugin operations, with any errors. |
sfb-plugin-debug.log | All logs of nominal plugin operations, as well as debugging logs. |
sfb-elasticsearch.log | Logs for only the internal Elasticsearch node. |
sfb-elasticsearch-debug.log | 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