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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Highlighted

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
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,154 views 0 7
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