It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Opengrok vs Bit Bucket Elastic Search

John Lawlor Jun 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

Peter Hayes Feb 15, 2018

Hyperlinking within the UI between files would be great.  

Martin Dobroucký Sep 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
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,964 views 1 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you