Search Codebase Restructure

cancel
Showing results for 
Search instead for 
Did you mean: 

Search Codebase Restructure

tpage
Alfresco Employee
3 0 2,000

You may have noticed some changes recently in the SearchServices codebase.  Before we go into the details it might be interesting to consider the number of git repositories that we were previously working with:

Git repositories used by the Search Team
This diagram just shows the projects we were editing for the latest version of Search Services.

If you find it hard to track the compatibility between different versions of ACS and Search Services[1] then you can imagine how we felt with all the different versions of these different internal libraries.

In January we started the process of consolidating this code by merging the solrclient history into Search Services (SEARCH-1395). The solrclient project was originally intended to support Solr 4 and Solr 6, however we subsequently took the decision not to support Search Services with Solr 4. Consequently the effort of maintaining a library with a separate lifecycle became redundant.

We made a similar change to our enterprise search codebase too, merging the git repositories for Insight Engine, Insight JDBC and Insight Zeppelin.

The next step is for us was to merge the enterprise and community code into a single repository.

A major motivation for this is that our end-to-end tests are currently in a separate project and we would prefer to store them in the same repository (on the same branch) as the production code. This will allow us to simultaneously make changes on feature branches to our production and test code. We have preemptively merged our test codebases, and have ticket for the rest of the work which we are hoping to start in the near future.

However we want to keep the Search Services code open source and so we've created a two-way community mirror that pushes all our community changes to GitHub and allows us to accept community pull requests and incorporate them with the enterprise code.

The current project structure now looks like this and, as mentioned, we're planning to simplify it further.

One side-effect of this is that we've introduced some new root directories (search-services and insight-engine) and a new root pom file. Our community repository does not contain the insight-engine code, and so needs to be built from within the search-services module. We have added this directory to our history too, as this will make it easier to copy bug fixes between branches and perform code comparisons. However this means that if you have an existing clone of the project then you will need to create a fresh clone.

If you come across any problems with the new codebase then please let us know (or send us a pull request!)  We're looking forward to spending more time adding value to the product and less time managing releases of internal libraries.

[1] Compatibility information for ACS and Search Services is available from our docs site.