cleaned up the code for buildIndexRequestForProtocol
go back to previous commit and abandon all changes made for search
fixed a long-number bug in freemarker
refactored the code to adapt updated restApi function