Refactor Search to Doctrine 2

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | na
| Fixed tickets | 
| License       | MIT
| Doc PR        |

Todo

  - [x] Fix DQL DELETE statement.