gitbucket-fess-plugin is a GitBucket plugin that provides global search, that is, search across multiple repositories.
Users can search for:
This plugin cooperates with Fess, which is a full-text search server powered by Elasticsearch. But, special knowledge is NOT required to use both Fess and this plugin.
See Maven Repository.
Plugin version | GitBucket version | Fess version |
---|---|---|
1.7.x | 4.35 - | 11.0.1 -, 12.x |
1.6.x | 4.34 | 11.0.1 -, 12.x |
1.5.x | 4.32 - | 11.0.1 -, 12.x |
1.4.x | 4.24.1 - | 11.0.1 -, 12.x |
1.3.x | 4.20 - | 11.0.1 -, 12.x |
1.2.x | 4.15 - | 11.0.1 -, 12.x |
1.1.x | 4.{11, 12, 13, 14} | 11.0.1 -, 12.x |
1.0.0 | 4.10 | 11.0.1 |
1.0.0-beta2 | 4.7 | 10.3 |
1.0.0-beta1 | 4.6 | 10.3 |
Download gitbucket-fess-plugin
jar file from the release page and
put it into ~/.gitbucket/plugins
(If the directory does not exist, create it by hand).
After the installation, the admin user sets up both of GitBucket and Fess.
The flow of the setting is like the following:
Run GitBucket and Fess.
If you run the both applications on localhost
, use different port numbers.
http://localhost:8080/gitbucket/
$ java -jar gitbucket.war --port=8080 --prefix=gitbucket
http://localhost:8081/fess/
$ ./bin/fess -Dfess.port=8081 -Dfess.context.path=/fess/
Access to http://[GitBucket URL]/[User Name]/_application
as a GitBucket's admin user and generate an access token.
This token will be used by crawlers of Fess.
Access to http://[Fess URL]/admin/dataconfig/
as a Fess's admin user and set up a data crawler.
Then, fill each form as below:
url=http://[GitBucket URL]
token=[GitBucket's Token generated in Step 2]
You don't have to change other values.
After you create a configuration successfully, you can find it in http://[Fess URL]/admin/dataconfig/
.
Then, click it and create a new crawling job.
You can set up a crawling schedule here, but you can also change it later. Thus, if you are new to Fess, you don't need to change any value here. (For more details about scheduling, see a later section.)
Move to http://[Fess URL]/admin/scheduler/
.
Then, you will find the job created in Step 3 on the top of the list.
Choose and start it.
If a crawler starts successfully, the status of the job scheduler becomes Running like the following:
Crawling process takes time, depending on a number of contents in GitBucket. Fess stores codes on the default branch in each repository. After the crawling job finishes, you can search GitBucket's contents on Fess.
This is the final step.
Access to http://[GitBucket URL]/fess/settings
as an admin user and register the URL of Fess's top page.
Note that the following image uses the URL of Fess started with flags -Dfess.port=8081 -Dfess.context.path=/fess/
.
You can also register a Fess's access token here. It is required for private repository search, but you can leave this form empty now. For more details, see the next section.
Then, global search will be enabled!
If the admin user registers a Fess's access token at http://[GitBucket URL]/fess/settings
,
users can explore their private repositories.
How to generate Fess's access token
Access to http://[Fess URL]/admin/accesstoken/
as an admin user and
click the Create New
button.
Next, fill in the form like the following:
permission
Then, access token will be created.
By setting up job schedulers on Fess, you can run data crawlers periodically to keep search results up to date.
Access to http://[FessURL]/admin/scheduler/
and choose a crawler job.
Then, you can setting up the value of Schedule
in Cron-format.
You need to install sbt to build this plugin from source code.
$ sbt package
$ sbt scalafmt
Any contribution will be appreciated! Please send issues or pull requests.
If you want to increment the version number, please update values in:
build.sbt
src/main/scala/Plugin.scala