[Doc] Java API: add search templates

Closes #7321.