Code Search is not returning expected results
Running a search for a string is not returned in the results even though the criteria of being located within a file on the default branch has been met.
- Data Center running in AWS using a remote Elasticsearch node that is also in AWS
The following can be seen in the atlassian-bitbucket.log file:
2017-11-07 15:15:50,421 ERROR [io-pump:thread-12917] c.a.b.s.i.i.DefaultIndexService On next - expected status code 200 but got: 413
Http response 413 translates to Payload too large.
Looking at the AWS Documentation we see that there are network limits in place that corresponds to the size/type of the Elasticsearch instance.
Configure the max batch size in bitbucket.properties to be less than the Elasticsearch instance's limit.
For example, if the Elasticsearch instance has a 10MB maximum size limit, set the following property to be a value in bytes which is less than 10MB - such as 7MB:
Change the Elasticsearch instance type to leverage the appropriate network limit and trigger a full re-index.