Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Opengrok vs Bit Bucket Elastic Search

John Lawlor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 15, 2017

We are using Opengrok and more recently Bit Bucket Elastic Search. Elastic Search seems to be the emerging search technology. However, I think Opengrok is far better. The main advantage I see is that it marks up the results. You can click on any variable/class/method in the results, just like you would in an IDE.

They both have cryptic search syntax, that I can live with.

There is quite a bit of back end work to keep Opengrok running - jenkins jobs to run indexing etc. We would like to have just one search tool... but for the moment Opengrok is simply better.

1 comment

hayesp25
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 15, 2018

Hyperlinking within the UI between files would be great.  

Martin Dobroucký
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 19, 2018

+1 for improving BitBucket search to be as good as Opengrok.
In OpenGrok you can:
- search syntax allows more complex queries, which allows to have less false positive search results, if you search for something special
- search only for symbols definitions
- latest version has good words suggester
- etc.


BTW Hypelinks from Opengrok to Bitbucket are easy to add using 'header_include' file in Opengrok.
Put below javascript into 'header_include' file and configure Opengrok to use it.


<script type="text/javascript">

// add link to bitbucket in header bar
document.pageReady.push(function() {
// parse paths from url
TODO var i = /[/]xref[/]([^-]+)-([^/]+)[/](.*)/.exec(window.location.pathname); // TODO adjust regex to your directory projects names in Opengrok

if(i) {
i = { project:i[1], repo:i[2], path:i[3] };
// create bb link
var bbLink = "https://bitbucket.yourcompany.com/projects/"+i.project+"/repos/"+i.repo+"/browse/"+i.path+""+window.location.hash+"";
// add button
$("div[id='bar'] ul").prepend("<li><a id='bblink' href='"+bbLink+"'>Show on Bitbucket</a> | </li>");
}
});


// add link to bitbucket in search results
document.pageReady.push(function() {
// attach to download links
$("tbody.search-result tr td.q a[title='Download']").after(function(a) {
// parse paths from url
TODO var i = /[/]download[/]([^-]+)-([^/]+)[/](.*)/.exec(this.href); // TODO adjust regex to your directory projects names in Opengrok

if(i){
i = { project:i[1], repo:i[2], path:i[3] };
var lines = $(this).parent().parent().find('span.l').toArray().map(function(x) { return x.innerText;}).join(',');
var bbLink = "https://bitbucket.yourcompany.com/projects/"+i.project+"/repos/"+i.repo+"/browse/"+i.path+"#"+lines+"";
return "<a title='Show on BitBucket' rel='noreferrer' href='"+bbLink+"'> BitBucket</a>";
}
})
});

</script>

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events