Feature/snippets

This PR has the changes to search that we've agreed on.
All the Java tests pass here, but there are a few 400 errors I'm seeing from the browser having to do with query validation.
Probably when you get a chance to take a look here we can see whether I hit things OK or if it needs adjustment; I don't expect regressions but there's a lot different with search transforms so we'll see.