Opengrok vs Bit Bucket Elastic Search

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

Hyperlinking within the UI between files would be great.  

+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
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,286 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you