When a solver implements a custom search heuristic, it generally adds a solver specific annotation. Examples for Gecode can be found in the gecode.mzn file. Then to, for example, use the "relax and reconstruct" (random LNS) search heuristic, you can include the Gecode declarations and use it as a normal search heuristic:
Implementing a custom search heuristic in Gecode can be tricky, but the MPG should provide a comprehensive guide. When you've created your new search heuristic, then you can add it to the FlatZinc processing here to add it to the created instance. (And add it to the earlier mentioned gecode.mzn file to make it available in MiniZinc.