Search for code in files larger than 512kib

RyanM February 2, 2020

Can we configure BitBucket Server Code Search to index files larger than 512 KiB?

Here it mentions: "Only files smaller than 512 KiB are searchable."

https://confluence.atlassian.com/bitbucketserver/search-for-code-in-bitbucket-server-814204781.html

My git repository contains many .sql files at around 10mb.

Is this 512 kib limit hardcoded or configurable?

1 answer

0 votes
Lenin Raj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2020

Hi @RyanM 

I looked at https://confluence.atlassian.com/bitbucketserver/bitbucket-server-config-properties-776640155.html and I guess this limit isn't configuration. If you need to search only one Git repository, will cloning the repository locally and running a "grep" work for you?

RyanM February 2, 2020

I have over 200 repositories

Like DEBS likes this
DEBS November 25, 2020

I agree with the OP that while a clone/grep could work for those large files, it is not ideal if you need to know which repository to clone in the first place.  In fact, it is our goal to use Bitbucket search instead of our gaggle of command line driven grep scripts.  And you have to admit that the Bitbucket interface is much prettier than the scrolling output of a shell screen.  Besides, isn't that the premise behind the birth of Bitbucket - a pretty interface?

I realize this was probably a performance decision made when git and Bitbucket were only being used for the storage of actual source.  And quite honestly source code shouldn't grow greater than 512k or you probably aren't following good coding practices.  However, with the open-door flexibility of git and Bitbucket, we have been treating our repositories like a bucket and putting everything in there.  This includes sql output like the OP, svg files, and some rather large libraries (which are probably overdue for a code review).

It would be wonderful if someone could find that bit to change or point us to an addon that can increase or get around the size limit.  Alternately, if this setting is hard coded, is it a possibility to be considered in a future feature request and what would be the proper venue for such a request?

Like Ryan Monk likes this
DEBS November 27, 2020

I received reply back from the maker of Smarter Search for Bitbucket.  He confirms it has its own settings for indexing files and claims his search can handle indexing files up to 150mb, if not more, depending on available ram to the Bitbucket instance (and ElasticSearch if external).  He recommended minimum 16mb dedicated to the server.  Great and fast support I might add.  I wasn't expecting a response so quickly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events