Please format your code using </>
icon as explained in this guide. It will make your post more readable.
Or use markdown style like:
```
CODE
```
I edited your post.
What does this line prints?
System.out.println(totalhits);
Could you also print:
System.out.println(searchResponse.toString());